jQuery DatePicker with today as maxDate jQuery DatePicker with today as maxDate jquery jquery

jQuery DatePicker with today as maxDate


$(".datepicker").datepicker({maxDate: '0'});

This will set the maxDate to +0 days from the current date (i.e. today). See:

http://api.jqueryui.com/datepicker/#option-maxDate


If you're using bootstrap 3 date time picker, try this:

$('.selector').datetimepicker({ maxDate: $.now() });