Shiva Bhusal
Shiva's Blog

Follow

Shiva's Blog

Follow

Jquery DatePicker: Disable previous Date

Shiva Bhusal's photo
Shiva Bhusal
·Oct 7, 2014·

1 min read

Play this article

To disable the user to select dates earlier than a date, you need to create a Date object of your barrier date as follows

// Create a Date Object
barrierDate=newDate("2014/02/12");

// Apply datepicker to a field#You can also set format of date you prefer
$('#idOfDateField').datepicker({minDate:barrierDate});
 
Share this