I would like to know how I can create a function that will disable the dates passed in jQuery UI. For example, now are 15/09/2014 07:31:25, how do I disable any date and time prior to this current time?
I would like to know how I can create a function that will disable the dates passed in jQuery UI. For example, now are 15/09/2014 07:31:25, how do I disable any date and time prior to this current time?
You can use minDate in datepicker options .
The documentation says that you can use three types for this option value:
Date: A specific date. Number: The number of days starting today. String: A string formatted as defined in the dateFormat option, for example "+ 1m + 7d" represents 1 month and 7 days from today's date. / p>
$("#datepicker").datepicker({ minDate: 0});