JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" id="alternate" size="30" />
<div id="datepicker"></div>

JavaScript

$(function() {
    $( "#datepicker" ).datepicker({
        altField: "#alternate",
        onSelect: function() {
        debugger;
    $(this).data('datepicker').inline = true;                               
},
onClose: function() {
    $(this).data('datepicker').inline = false;
}
        
    });
});