How to disable date and time passed in jQuery UI calendar?

1

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?

    
asked by anonymous 15.09.2014 / 13:33

1 answer

4

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>

Example: link

$("#datepicker").datepicker({ minDate: 0});
    
15.09.2014 / 13:50