I'm using a JQUERY Time Picker by Jon Thornton for my PHP reservation system with disableTimeRanges. My time ranges are from my database, which I put in arrays and I use AJAX to get my time ranges from my PHP file.
$('#Ttime').timepicker({
'timeFormat': 'h:i A'
'disableTimeRanges': unavailableTime
});
$("#Ttime").focus(function(){
$.ajax({
url: '../admin/thname.php',
data: "q="+id,
dataType: 'json',
async : false,
success: function(data){
unavailableTime = data;
}
});
});
It all works but when I try to put MAX/MIN Time, my DisableTimeRanges doesn't work. It's like the codes are overlapping or having conflicts with each other.
$('#Ttime').timepicker({
'minTime': '2:00am',
'maxTime': '2:00pm',
});
Can anyone please help me with this problem ?