public
Description: Click-draggable. Range-makeable. A better calendar.
Homepage: http://stephencelis.com/projects/timeframe
Clone URL: git://github.com/stephencelis/timeframe.git
Click here to lend your support to: timeframe and make a donation at www.pledgie.com !
stephencelis (author)
Mon Apr 21 08:56:00 -0700 2008
commit  da337a9e4a50f137ea0f1b57fddc68ec63b30360
tree    ab35641418289d3ab1acecbc4143d4ba50f7168e
parent  253455c35ec503e18b286a1bcc86a5f92fad903d
name age message
file .gitignore Sun Apr 20 19:35:00 -0700 2008 Initialization [stephencelis]
file MIT-LICENSE Sun Apr 20 19:35:00 -0700 2008 Initialization [stephencelis]
file README.markdown Sun Apr 20 21:51:35 -0700 2008 README formatting and linking [stephencelis]
file TODO Mon Apr 21 08:38:56 -0700 2008 TODO/FIXME additions [stephencelis]
directory example/ Mon Apr 21 08:56:00 -0700 2008 IE7 display fix [stephencelis]
file timeframe.js Mon Apr 21 08:31:51 -0700 2008 Don't bark at me, IE7 [stephencelis]
README.markdown

Timeframe

Click-draggable. Range-makeable. A better calendar.

The code:

new Timeframe(element, options);

Options available:

  • calendars: 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).

  • weekoffset: The weekday offset (use 1 to 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).

Also!!:

The startfield and endfield are parsed with Date.parse(), so feel free to use Datejs for ninja-quick date-parsing.

An example:

<script type="text/javascript" charset="utf-8">
  //<![CDATA[
    new Timeframe('calendars', {
      startfield: 'start',
      endfield: 'end',
      previousbutton: 'previous',
      todaybutton: 'today',
      nextbutton: 'next',
      resetbutton: 'reset' });
  //]]>
</script>

Dependencies

Timeframe requires Prototype 1.6.

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.