JSFiddle - React, Tailwind, and code Playground
HTML
<div><div id="monthOnly"><input type="text" class="monthly-picker" name="mdate"></div></div>
<div><div id="month"><input type="text" class="monthly-picker1" name="mdate"></div></div>
<style id='hideMonth'></style>
JavaScript
$('.monthly-picker').datepicker({
beforeShow: function() { $('#hideMonth').html('.ui-datepicker-calendar{display:none;}'); },
onClose: function(){
setTimeout(function(){$('#hideMonth').html('');},300);
}
});
$('.monthly-picker1').datepicker();