Is it possible to disable future date from today?
Let say today is 23/10/2010, so 24/10/2010 onwards are disabled.
Sorry I am very new in jQuery and JavaScript.
In the calendar widget their is an option to select max date, in which you can set the value as CurrDate(). So that future dates in the calendar would be disabled.
// date range picker $('. date_input'). daterangepicker({ autoUpdateInput: false, locale: { cancelLabel: 'Clear', format: 'DD-MM-YY' } });
If you want to future date disable from today use today. getFullYear() - 10 in order to disable 10 years before which means disable from 2008.
Yes, indeed. The datepicker has the maxdate property that you can set when you initialize it.
Here's the codez
$("#datepicker").datepicker({ maxDate: new Date, minDate: new Date(2007, 6, 12) });
$(function() { $("#datepicker").datepicker({ maxDate: '0'}); });
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With