How to set minDate to current date in jQuery UI Datepicker?

前端 未结 7 924
渐次进展
渐次进展 2020-12-03 04:26

This is my code and it is not working correctly. I want to set minDate to the current date. How can I do it?

$(\"input.DateFrom\").datepicker({
         


        
7条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-03 04:55

    Use this one :

     onSelect: function(dateText) {
                     $("input#DateTo").datepicker('option', 'minDate', dateText);
                }
    

    This may be useful : http://jsfiddle.net/injulkarnilesh/xNeTe/

提交回复
热议问题