How do I clear/reset the selected dates on the jQuery UI Datepicker calendar?

后端 未结 16 1624
感情败类
感情败类 2020-12-02 07:19

How do I reset the datepicker calendar values?.. The min and max date restrictions?

The problem is that when I clear the dates (by deleting the textbox values), th

16条回答
  •  情深已故
    2020-12-02 07:43

    Reset the max date attributes on your datepicker when you click clear.

    From jquery website

    Get or set the maxDate option, after init.
    
        //getter
        var maxDate = $( ".selector" ).datepicker( "option", "maxDate" );
        //setter
        $( ".selector" ).datepicker( "option", "maxDate", '+1m +1w' );
    

提交回复
热议问题