Code Monkey home page Code Monkey logo

weekline's People

Contributors

dkltd avatar perecedero avatar tienvx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

weekline's Issues

Problems to pre define values for a weekline

Hi,

I have problems to pre define values for a weekline. I can't get it work. Probably I'm too stupid, because I can't see, what I'm doing wrong. Any help would be appreciated.

I use the following sample code for an "test.html" file that is placed in the "weekLine-master" folder:

<html>
<head>
<link rel="Stylesheet" href="styles/cleanslate.css" />
<link rel="Stylesheet" href="styles/jquery.weekLine-white.css" />
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="scripts/jquery.weekLine.js"></script>
<script>
$(document).ready(function(){
    // Return selected days as dates,
    // starting from coming Monday
    var weekCal = $("#weekCal").weekLine({
        dayLabels: ["So.", "Mo.", "Di.", "Mi.", "Do.", "Fr.", "Sa."],
        onChange: function () {
            $('#selectedDays').html($(this).weekLine('getSelected', 'indexes'));
            $('#selectedDaysInput').val($(this).weekLine('getSelected', 'indexes'));
        }
    });
    // Pre select some days
    weekCal.weekLine("setSelected", "2,3,4"); 
});
</script>

<title>jQuery Days-Of-Week-Picker Plugin</title>
</head>
<body>
<h1 style="margin-top:150px;"></h1>
<table border="1">
<tr>
    <td height="25">
        <div class="weekDays" id="weekCal"></div>
    </td>
</tr>
<tr>
    <td height="25">
        <div id="selectedDays"></div>
    </td>
</tr>
<tr>
    <td height="25">
        <input id="selectedDaysInput" type="text" />
    </td>
</tr>
</table>
</body>
</html>

Altering values for days

Is it possible to integrate a paramter "weekStart:" (similar to "dayLabels:") to alter the values for the single days ?

In my database with more than 100.000 datasets I use these values:
1=Sunday - 2=Monday - 3=Tuesday - 4=Wednesday - 5=Thursday - 6=Friday - 7=Saturday

Monday as the first day of week

I'v tried to set Monday for the first day of week (Mon=0 ... Sun=6), but it fails. It seems that there is no "nextMonday()" function, but you wrote in your examples (startDate: nextMonday()).
missing_function_nextmonday

Display only certain days?

Is there a way to display only certain days. I only want Mon-Fri.

I tried
dayLabels: ["Mon", "Tue", "Wed", "Thur", "Fri"],

but that did not work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.