JSFiddle - React, Tailwind, and code Playground
HTML
<div id="datepicker"></div>
JavaScript
$("#datepicker").datepicker({
inline: true,
firstDay: 1,
showOtherMonths: true,
dayNamesMin: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
onSelect: function(dateText, inst) {
var dateAsString = dateText; //the first parameter of this function
var dateAsObject = $(this).datepicker( 'getDate' ); //the getDate method
alert(dateAsString);
}
});