JSFiddle - React, Tailwind, and code Playground

HTML

<div id="startDate"></div>

<input type="text" id="Txtdate" >

JavaScript

$('#Txtdate').datepicker({
            
            dateformat:"MM-yy",
            changeMonth: true,
            changeYear: true,
            
            onChangeMonthYear: function (year, month) {
            var date = new Date();
                $("#startYear").val(year);
                $("#startMonth").val(month);
                $(this).val(date.getMonth(month) +"/"+year);
            }
        });

 
$(".ui-datepicker-month").prepend("<option value='' selected='selected'>Month</option>");

$(".ui-datepicker-year").prepend("<option value='' selected='selected'>Year</option>");