'Bootstrap datepicker disable dates for certain fields
I have series of bootstrap date fields like this
<input id="TxtNextReviewDate" type="text" asp-for="RequestFormMaster.NextReviewDate" class="form-control form-control-sm datepicker">
<input id="DateSalesRequest" asp-for="SLAInformation.SalesDateOfSubmission" type="text" class="form-control form-control-sm datepicker" />
<input id="DateFinalInfoReceived" asp-for="SLAInformation.SalesFinalInfoReceived" type="text" class="form-control form-control-sm datepicker" />
i want to disable past dates for Next Review Date Calendar(First Calendar input).For the rest i should able to select the past dates.
This is how i am disabling the past dates, its disabling other date field also.how can i restrict this for only one field?
<script>
var date = new Date();
date.setDate(date.getDate());
$('.datepicker').datepicker({
format: 'dd/mm/yyyy',
startDate: date
});
</script>
Thanks, Teena
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
