its my script
$(document).ready(function() {
// $(".slot_div").hide();
//$('.pignose-calender-unit-active').prop('disabled', true);
// var ampm = hour >= 12 ? 'pm' : 'am';
// hour = hour % 12;
// hour = hour ? hour : 12; // the hour '0' should be '12'
// //minutes = minutes < 10 ? '0'+minutes : minutes;
// var strTime = hour + ':' + 00 + ' ' + ampm;
var today = '<?php echo $today ?>' ;
var hour = new Date().getHours();
var min = new Date().getMinutes();
$(".time-button").each(function() {
if (hour > $(this).val())
$(this).prop("disabled", true);
$(this).addClass('disable_btn');
});
});
var d = new Date();
var delay = 500;
var month = d.getMonth()+1;
var day = d.getDate();
var output = d.getFullYear() + '/' +
((''+month).length<2 ? '0' : '') + month + '/' +
((''+day).length<2 ? '0' : '') + day;
// console.log(today);
var full_date;
var prev;
var dateselected;
$('#calendar').pignoseCalendar({
minDate: output,
init: function(context) {
setTimeout(function() {
}, delay);
},
next: function(info, context) {
setTimeout(function() {
}, delay);
},
prev: function(info, context) {
setTimeout(function() {
}, delay);
},
select: function(date, obj) {
var full_d=date[0].format('YYYY-MM-DD');
var prev=date[0];
var curnt=date[1];
var full_date=new Date(full_d);
$('#boxx').html(full_d);
$('#box').html(full_date.toDateString());
$('.time-button').prop('disabled', false);
if(date[0]){
//if ($('.time-button').hasClass('active')) {
$('.time-button').toggleClass('active');
}
if(date[1]){
$('.time-button').removeClass('active');
}
}
});