JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<input type="submit" id="submit" name="submit">
JavaScript
updateSubmitButtonState();
function updateSubmitButtonState() {
var timezone = "Asia/Calcutta";
var currentTime = new Date();
var hours = currentTime.getHours();
var minutes = currentTime.getMinutes();
var t = getDateObj(currentTime.getHours() + ":" + currentTime.getMinutes());
if (t >= getDateObj('10:00') && t <= getDateObj('10:20') ||
t >= getDateObj('11:00') && t <= getDateObj('11:20') ||
t >= getDateObj('13:00') && t <= getDateObj('13:20') ||
t >= getDateObj('15:15') && t <= getDateObj('15:25') ||
t >= getDateObj('17:30') && t <= getDateObj('17:40') ||
t >= getDateObj('19:00') && t <= getDateObj('19:10') ||
t >= getDateObj('20:30') && t <= getDateObj('20:40') ) {
$("#submit").css("display", "none");
} else {
$("#submit").css("display", "block");
}
}
function getDateObj(timeStr) {
return new Date('01/01/2017 '+timeStr+':00');
}