Hi @RAVI,
You can try using the code below.
<script type="text/javascript">
$(function () {
var date = new Date();
if (date.getDate() > 5) {
date.setDate(1);
}
else {
date.setDate(-6);
}
$("#TextBox2").datepicker({
dateFormat: "dd-M-yy",
minDate: date,
changeYear: true,
changeMonth: true,
yearRange: '2018:2030',
defaultDate: date,
});
});
</script>
If A Current Month Is Below 5th Date It Should Open Previous Month Last 6 Days.
If Current Month Is Greater Then 5th Date It Should Dispaly Select Date As From Month First Date Only.
Best regards,
Lan Huang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.