minDate : Date|String|FunctionDefault: undefined

The minimum selectable date. When not set, there is no minimum.

If the minDate is set by string, then the date in the string needs to follow the format specified by the 'format' configuration option.

Examples

Today

    
 <input id="datepicker" width="312" />
 <script>
    var today, datepicker;
    today = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate());
    datepicker = $('#datepicker').datepicker({
        minDate: today
    });
 </script>

  

Yesterday

    
 <input id="datepicker" width="312" />
 <script>
     $('#datepicker').datepicker({
        minDate: function() {
            var date = new Date();
            date.setDate(date.getDate()-1);
            return new Date(date.getFullYear(), date.getMonth(), date.getDate());
        }
     });
 </script>

  

Bootstrap

    
 <input id="datepicker" width="220" />
 <script>
     $('#datepicker').datepicker({
        format: 'yyyy-mm-dd',
        value: '2022-12-15',
        minDate: '2022-12-12',
        uiLibrary: 'bootstrap'
     });
 </script>

  

Bootstrap 4

    
 <input id="datepicker" width="234" />
 <script>
     $('#datepicker').datepicker({
        value: '12/15/2022',
        minDate: '12/12/2022',
        uiLibrary: 'bootstrap4'
     });
 </script>

  

Bootstrap 5

    
 <input id="datepicker" width="234" />
 <script>
     $('#datepicker').datepicker({
        value: '12/15/2022',
        minDate: '12/12/2022',
        uiLibrary: 'bootstrap5'
     });
 </script>