JSFiddle - React, Tailwind, and code Playground
by Kamlesh Gupta
HTML
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery.ui.all.css">
<input type='text' id='txtDate' />
CSS
body
{
font-family:Arial;
font-size : 10pt;
padding:5px;
}
.Highlighted a{
background-color : Green !important;
background-image :none !important;
color: White !important;
font-weight:bold !important;
font-size: 12pt;
}
JavaScript
$(document).ready(function() {
var SelectedDates = {};
SelectedDates[new Date('04/05/2015')] = new Date('04/05/2015');
SelectedDates[new Date('05/04/2015')] = new Date('05/04/2015');
SelectedDates[new Date('06/06/2015')] = new Date('06/06/2015');
$('#txtDate').datepicker({
beforeShowDay: function(date) {
var Highlight = SelectedDates[date];
alert(
if (Highlight) {
return [true, "Highlighted", Highlight];
}
else {
return [true, '', ''];
}
}
});
});