JSFiddle - React, Tailwind, and code Playground
by Boopathi Rajan
HTML
<script src="https://raw.github.com/fgelinas/timepicker/master/jquery.ui.timepicker.js"></script>
<link rel="stylesheet" href="https://raw.github.com/fgelinas/timepicker/master/jquery.ui.timepicker.css">
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/ui-lightness/jquery-ui.css">
<input id="date" class="datepicker" />
<input id="time" class="timepicker" />
JavaScript
$('#date').datepicker({
minDate: 0
});
$('#time').timepicker({
onHourShow: function( hour ) {
var now = new Date();
if ( $('#date').val() == $.datepicker.formatDate ( 'mm/dd/yy', now ) ) {
if ( hour <= now.getHours() ) {
return false;
}
}
return true;
}
});