Click-draggable. Range-makeable. A better calendar. In MooTools.
A port of Stephen Celis's Timeframe for Prototype. The Public API should be the same.
This is still a work in process, but it should be mostly working at this point.
new Timeframe(element, options);
months: The number of calendar months showing at once (default:
format: The strftime format for the dates in the input fields (default:
%b %d, %Y). (With Datejs, it takes Datejs formatting.)
weekOffset: Override the localization's default weekday start with this option (e.g.,
1will force the rows to start on Monday; use
endField: Declare the range start and end input tags (by default, these are generated with the Timeframe). When the
valueattribute is pre-populated, the Timeframe will load with this range.
resetButton: Declare the navigational buttons (these are also generated by default with the Timeframe).
latest: The earliest and latest selectable dates (accepts either a
Dateobject or a
Stringthat can be parsed with
maxRange: Limit the maximum possible range length (set to
1to 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."