I am trying to use the example for the datepicker date range. I'd like to limit the range to not allow any dates after today. I have tried to put maxdate here...
var dates = $( "#enterfrom, #enterto" ).datepicker({
maxDate: "0",
changeMonth: true,
onSelect: function( selectedDate ) {
var option = this.id == "from" ? "minDate" : "maxDate",
instance = $( this ).data( "datepicker" ),
date = $.datepicker.parseDate(
instance.settings.dateFormat ||
$.datepicker._defaults.dateFormat,
selectedDate, instance.settings );
dates.not( this ).datepicker( "option", option, date );
}
});
But then the "to" date is limited to only the date that was selected in "from"?
I would really appreciate some help - please be specific though, I am obviously not experienced in jquery/javascript. Thank you!