Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenmasters/b40b53fc8c9d79ea50ac232023c8df77 to your computer and use it in GitHub Desktop.
Save kenmasters/b40b53fc8c9d79ea50ac232023c8df77 to your computer and use it in GitHub Desktop.
From: <input type="text" id="txtFromDate" />
To: <input type="text" id="txtToDate" />
$(document).ready(function(){
$("#txtFromDate").datepicker({
numberOfMonths: 2,
onSelect: function(selected) {
$("#txtToDate").datepicker("option","minDate", selected)
}
});
$("#txtToDate").datepicker({
numberOfMonths: 2,
onSelect: function(selected) {
$("#txtFromDate").datepicker("option","maxDate", selected)
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment