dkltd / weekline Goto Github PK
View Code? Open in Web Editor NEWweekLine a jQuery week day picker plugin
License: MIT License
weekLine a jQuery week day picker plugin
License: MIT License
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>
Hello,
Everytime i try to setSelected i get this error in console:
Uncaught Error: Syntax error, unrecognized expression: a:[href='#0']
Here is my code:
var weekline = $("#weeklineCal-01").weekLine();
weekline.weekLine("setSelected", "0,2,3");
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
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.