Jquery DatePicker: Disable previous Date

0 Min. Read
Oct 7, 2014

 Rails Ruby JS

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

1
2
3
4
5
// 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});

You might also like

Jquery Date Picker: Disable Previous Date 

ShivaShiva Bhusal (CTO) 0 Min. Read Oct 7, 2014
 Rails Ruby JS

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 = new Date(“2014/02/12”); #Apply datepicker to a field #You can also set format of date you prefer $(‘#idOfDateField’).datepicker({minDate: barrierDate});


Read More..


Write To Me

Hire me shiva bhusal
We'll never share your email with anyone else.
I'll never share your email with anyone else.