JSFiddle - React, Tailwind, and code Playground
by junaidfarooqui
HTML
<input type="text" class="form-control weekcal-x" name="start" id="start" custom="" />
JavaScript
$(".weekcal-x").datepicker({
showWeek: true,
firstDay: 1,
maxDate: +7,
onSelect: function (dateText, inst) {
$(this).val("Week " + $.datepicker.iso8601Week(new Date(dateText)) + ', ' + $.datepicker.formatDate("yy", new Date(dateText)));
}
}).datepicker('widget').addClass('ui-weekpicker');
$('.ui-weekpicker').on('mousemove', 'tr', function () {
$(this).find('td a').addClass('ui-state-hover');
});
$('.ui-weekpicker').on('mouseleave', 'tr', function () {
$(this).find('td a').removeClass('ui-state-hover');
});