JSFiddle - React, Tailwind, and code Playground
HTML
<p>Date: <input type="text" id="datepicker"></p>
JavaScript
$(function() {
$( "#datepicker" ).datepicker({
changeMonth: true,
changeYear: true,
beforeShow: function() {
var t = setTimeout(function() {
$(".ui-datepicker-month").replaceWith(
"<span class = 'dummy'>Foo</span>");
},100);
}
});
$("body").on("click",".dummy",function() {
var dateString = "01/04/2014";
$("#datepicker").datepicker("setDate", dateString);
});
});