I\'m building a date picker in jQuery ui. What I\'m trying to do is set a range, so when they pick the first date the second date appears and gives a 30 day window. I tried this
Try using the ui onSelect callback instead of .change(), http://api.jqueryui.com/datepicker/#option-onSelect
on init:
var $datepickerStart = $("#datepickerStart");
$datepickerStart.datepicker({
onSelect: function( selectedDate ) {
$datepickerStart.datepicker( "option", "minDate", selectedDate );
}
});