Jquery DatePicker: Disable previous Date

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});

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s