JSFiddle - React, Tailwind, and code Playground
HTML
In the below datepicker select a date any month other that the current month. <br/>
Then click the datepicker again.<br/>
The datepicker calendar will show today's month and year calendar and not the previously selected date's calendar.<br/>
<input type="text" id="a" />
JavaScript
/*
In the below datepicker select a date any month other that the current month. Then click the datepicker again. The datepicker calendar will show today's month and year calendar and not the previously selected date's calendar
*/
$(function() {
$('#a').datepicker({
changeMonth: true,
changeYear: true,
showButtonPanel: true,
dateFormat: 'MM yy',
});
});