Calendar Date Select
Version 1.15 (released February 19, 2009). See ChangeLog.
Demo (generously hosted by Nick Adams)
Overview
CalendarDateSelect is semi-light-weight (about ~20k of javascript/css) and easy to use (but gets even lighter with bundle-fu)! It takes full advantage of the prototype.js library, resulting in less code, but maintaining a great deal of functionality.
Some of it's capabilities:
- can pick a date, or a date-time, or a date with an optional time, as a popup selector or an embedded calendar!
- speaks several different formats
- is easy to localize
- is extensible. Calendar Date Select doesn't do everything under the sun (which is a good thing), but you can build on top of it.
Installation / Usage
- Install the calendar_date_select gem
- Add a gem dependency to your rails project (in environment.rb)
- Then, restart/start your rails project. All necessary files will be copied to your public folder.
- Now include this at the top of your layout: (you'll also need to include prototype, if you haven't already!)
sudo gem install calendar_date_select
config.gem "calendar_date_select"
<%= calendar_date_select_includes "red" # or "blue", or "silver", or nil for the default! %> # (if you want more control, you can get a list of stylesheets / javascripts via calendar_date_select_javascripts and calendar_date_select_stylesheets)
See the Demo for various uses of CalendarDateSelect.
Contributing
Please head on over to the CalendarDateSelect repository on github, fork, make your change, and send a pull request.
Upgrading
CalendarDateSelect only copies its asset files to the public folder if the main calendar_date_select.js doesn't exist (to prevent you from accidently losing any customization you may perform). To update to a new version of calendar date select, you'll want to run something like this:
> sudo gem update calendar_date_select > rm public/javascripts/calendar_date_select.js
Less is more
Concerned about lots of tiny asset files? Minimize and bundle your code with Bundle-Fu.
Other choices
There are many date pickers out there. Here is a little chart to show you some other choices:
| Project | JS Framework | Rails integration | JS+CSS code | Select DateTime | Drag? | Popup | Semantics | Localization |
| CalendarDateSelect | prototype.js | yes | 20k | yes | - | yes | - | yes |
| DhtmlCalendar | Dynarch | yes | 76k | yes | yes | yes | yes | yes |
| ActiveCalendar | Dynarch | yes | 76k | yes | yes | yes | yes | yes |
| "DatePicker" | none | yes | 12k | - | - | yes | - | - |
| Lotus Notes Web Datepicker | none | - | 22.5k | - | - | yes | - | - |
| Jason Moon's Calendar Script | none | - | 33k (no css) | - | - | - | - | - |
| Datepicker | prototype.js & scriptaculous | - | 16kb | - | - | yes | - | - |
Docs
Read the documentation.
Support
Feeling hopeless? Here's how to get help:
- Ask a question on the mailing list
- File a ticket using the issue tracker.
Sponsors and thanks
Calendar Date Select wouldn't be nearly as great of quality if it weren't for all the individuals and companies who have helped to improve it. Below is a list of all such who are due the gratitude.
Sponsors
Big Thanks
Ed W. for the refining feedback which helped this plug-in become "finished".
Jamis Buck for the great encouragement in the beginning.
JT - helping with documentation.
Steve Madsen - for the numerous patches.
Osku - Finnish format and translation.
Richard Quadling, Kevin Alexander - help on getting calendar_date_select prototype 1.6.0 compatible.
All who use this plug-in and are productive with it, and provide valuable feedback / bug reports / feature suggestions.
Author
Contact me:
Tim Harper ( 'tim_see_harperATgmail._see_om'.gsub('_see_', 'c').gsub('AT', '@') )


