Click-draggable. Range-makeable. A better calendar.
new Timeframe(element, options);
months
2
).format
%b %d, %Y
). (With Datejs, it takes Datejs formatting.)weekOffset
1
to start the week on Monday).startField
, endField
input
tags (by default, these are generated with the Timeframe).previousButton
, todayButton
, nextButton
, resetButton
earliest
, latest
Date
object or a String
that can be parsed with Date.parse()
).maxRange
1
to turn Timeframe into a regular old date picker).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.”
Generated from this code (see the source for more detail):
<script type="text/javascript" charset="utf-8">
//<![CDATA[
new Timeframe('calendars', {
startField: 'start',
endField: 'end',
earliest: new Date(),
resetButton: 'reset' });
//]]>
</script>
Timeframe is open source, tested, and available for forking, pushing, and pulling at Github:
http://github.com/stephencelis/timeframe
If you find Timeframe useful, please feel free to leave a donation:
Contact me with questions/comments at .
Learn more about me at stephencelis.com.
Copyright © 2008–2009 Stephen Celis. Provided under the MIT License.