JSFiddle - React, Tailwind, and code Playground
HTML
<input id="datepick" />
<button id="testme">Is my date really my date?</button>
JavaScript
$("#datepick").datepicker();
$("#testme").on("click", function() {
var thedate = $("#datepick").datepicker("getDate");
if (thedate === $("#datepick").datepicker("getDate")) {
alert("yes, it is!");
} else {
alert("no, it's different now!");
}
});