JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.js"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/themes/redmond/jquery-ui.css" type="text/css" />
<p><a href="#" id="break">break it</a> | <a href="#" id="unbreak">unbreak it (ugly)</a></p>
<input type="text" title="mm/dd/yy" id="dp" />
JavaScript
$('#dp').datepicker({
changeYear: true,
changeMonth: true
});
$('#break').click(function() {
$('#dp').datepicker('option', 'onSelect', function() {});
// it doesn't matter which option.
// this "works" too: $('#dp').datepicker('option', 'xxx', null);
});
$('#unbreak').click(function() {
$('#dp').datepicker('refresh');
});