I would like to modify days in month of February in datepicker. By default jQuery datepicker only allows 28 or 29 days in February. Instead, I would like to have 30 days in every year (regardless if it's a leap year or not). Below is the code for the datepicker field I created.
$('.date-field').datepicker({
dateFormat: "yymmdd",
orientation: "bottom auto",
autoclose: true,
showOnFocus: false
});
<link href='https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/ui-lightness/jquery-ui.css' rel='stylesheet'>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<div class="form-group m-1">
<label class="font-weight-bold" for="begin_dt">Begin Date:</label>
<input class="form-control date-field" type="text" name="begin_dt" id="begin_dt" value="" placeholder="yyyymmdd">
</div>
I couldn't find a way to do this with any of the options that are offered as a standard items in datepicker library. If anyone knows a way to achieve such a scenario please let me know.