Every repository with this icon (
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Sun Apr 20 19:35:00 -0700 2008 | [stephencelis] |
| |
MIT-LICENSE | Sun Apr 20 19:35:00 -0700 2008 | [stephencelis] |
| |
README.markdown | Tue May 06 21:35:47 -0700 2008 | [stephencelis] |
| |
TODO | Sun May 04 15:04:58 -0700 2008 | [stephencelis] |
| |
example/ | Sat May 10 09:11:56 -0700 2008 | [stephencelis] |
| |
timeframe.js | Sat May 10 09:11:56 -0700 2008 | [stephencelis] |
Timeframe
Click-draggable. Range-makeable. A better calendar.
The code:
new Timeframe(element, options);
Options available:
months: The number of calendar months showing at once (default:2).format: The strftime format for the dates in the input fields (default:%b %d, %Y). (With Datejs, it takes Datejs formatting.)weekOffset: The weekday offset (use1to start the week on Monday).startField,endField: Declare the range start and end input tags (by default, these are generated with the Timeframe).previousButton,todayButton,nextButton,resetButton: Declare the navigational buttons (these are also generated by default with the Timeframe).earliest,latest: The earliest and latest selectable dates (accepts either aDateobject or aStringthat can be parsed withDate.parse()).
Localization:
Drop in a localized version of Datejs, and it should just work. An added bonus is that the text fields will live-parse more nicely! Just try "next tues."
Notes:
- I'm just sick of multiple date pickers on the same page.
An example:
<script type="text/javascript" charset="utf-8">
//<![CDATA[
new Timeframe('calendars', {
startField: 'start',
endField: 'end',
earliest: new Date(),
resetButton: 'reset' });
//]]>
</script>
See it in action here.
Dependencies:
Timeframe requires Prototype 1.6 or higher.
Download:
Find the latest version of Timeframe on Github.
More information can be found at here.
Copyright (c) 2008 Stephen Celis, released under the MIT license.




