Bootstrap interferes with the functionality of Jquery datepicker mindate setting

Solution 1:
To implement a datepicker in jQuery, use:
For Bootstrap versions, utilize:
Solution 2:
In the newer version of the Bootstrap datepicker, use the following method:
Solution 3:
Instead of minDate, use startDate to disable past dates. Here’s an example:
Here’s a functional sample:
Solution 2:
Try the code provided below:
You can also attempt the following:
Solution 3:
Add the attribute mentioned below:
This solution worked for me.


Solution 1:

For jquery datepicker use:

$(".datepicker").datepicker({
    minDate: 0
});

For Bootstrap versions use:

$(".datepicker").datepicker({
     startDate: new Date()
});


Solution 2:


This method is used in the newer version of the bootstrap datepicker.

limiting end date **eg** +1d, +3m, +5y , -1d , -3m, -5y
limiting start date **eg**  +1d, -23d, +3m ,2y, -2y 
$('#dob').datepicker({
            fautoclose: true,
            startDate: '+1y',
   });
 $('#dob').datepicker({
            fautoclose: true,
            endDate: '-18y',
   });


Solution 3:


Instead of using minDate, utilize startDate to prevent the selection of past dates. For example, implement it like this…

$('#checkinDate').datepicker({
        format: "dd/mm/yyyy",
        autoclose: true,
        startDate: new Date()
    });

Frequently Asked Questions