A small and simple utility built on top of jQuery UI's datepicker that provides "validation" for date ranges.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



A small and simple utility built on top of jQuery UI’s 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.


Given a HTML snippet like the following:

<label for="fromDate">From:</label> <input id="fromDate" type="text"/> <label for="toDate">To:</label> <input id="toDate" type="text"/>

Initialize jquery-daterange-picker like so:

$(function(){ $.daterangepicker({ fromSelector: "#fromDate", toSelector: "#toDate", readOnly:true //avoids manual user input }); });

You can pass all options jQuery UI’s 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:

$(function(){ $.daterangepicker({ fromSelector: "#fromDate", toSelector: "#toDate", onSelectFrom: function() {}, //These will be called after onSelectTo: function() {} //each date has been selected }); });

Check examples in the demo directory or on the project page


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



  • 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.


Copyright © 2011- Leonardo Borges , released under the MIT license