jquery-daterange-picker

A small and simple utility built on top of jQuery UI's datepicker that provides "validation" for date ranges.

MIT License

Stars
8

h1. jquery-daterange-picker

A small and simple utility built on top of "jQuery UI's datepicker":http://docs.jquery.com/UI/Datepicker that provides "validation" for date ranges.

The quotes were used because the validation here means that once you select a 'from' date from the datepicker, all dates before that will be disabled in the 'to' datepicker, thus removing the need to actually present javascript validation errors.

h2. Usage

Given a HTML snippet like the following:

Initialize jquery-daterange-picker like so:

You can pass all options "jQuery UI's datepicker":http://docs.jquery.com/UI/Datepicker provides to jquery-daterange-picker. It will take care of passing them along.

It is sometimes useful to run callbacks after you have selected the dates. There are two special properties for that purpose, demonstrated below:

Check examples in the demo directory or "on the project page":http://leonardoborges.github.com/jquery-daterange-picker/demo/index.html

h2. Build

A Rakefile is provided for generating the release into the dist directory. It includes a minified version.

h2. Dependencies

h2. Contributing

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
  • Fork the project
  • Start a feature/bugfix branch
  • Commit and push until you are happy with your contribution
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

h2. Copyright

Copyright (c) 2011- "Leonardo Borges":http://www.leonardoborges.com , released under the MIT license