I’m using the datePicker in the jQuery UI core. I need a date picker that can only pick dates through the past all the way to today.
Is there an easy way to do this? — Note I’m using the UI core, not the DatePicker Plugin.
My jQuery call:
$(function() {
$(".datepicker").datepicker();
});
You should use the maxDate option when initializing the datepicker:
look here for reference: http://jqueryui.com/demos/datepicker/#option-maxDate