Created
January 25, 2014 05:05
-
-
Save oshanz/8612094 to your computer and use it in GitHub Desktop.
jquery date range
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
$("#From").datepicker({ | |
dateFormat: "yy-mm-dd", | |
changeMonth: true, | |
changeYear: true, | |
maxDate: new Date(), | |
onClose: function(selectedDate) { | |
$("#To").datepicker("option", "minDate", selectedDate); | |
} | |
}); | |
$("#To").datepicker({ | |
dateFormat: "yy-mm-dd", | |
changeMonth: true, | |
changeYear: true, | |
maxDate: new Date(), | |
onSelect: function() { | |
getginPage(1); | |
} | |
}); | |
$("#From").datepicker('setDate', -7); | |
$("#To").datepicker('setDate', new Date()); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment