Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have jQuery datetimepicker control for future dates but with one problem. It doesn't allow to take previous hours of future dates
eg current time is 15.30. If user selectes any future date then date time picker doesn't allow user to take hour before 15 and minutes before 30.

$("#" + MyID + "").datetimepicker({
    minDate: -0, maxDate: "+12M",
    dateFormat: 'dd-M-yy', changeMonth: true,
    changeYear: true,
    controlType: 'select',
    oneLine: true,
    timeFormat: 'hh:mm',
    minTime: "0:00", maxTime: "23:59"
});
$("#" + MyID + "").datetimepicker("show");


What is the issue with code. Any suggestion.

Setting
hourMin: 0
solves the issue for some extent but still case occurs randomly.

Thanks in advance.

What I have tried:

Searching on google for this issue but not perfect answer found for this case. Already used minTime & maxTime.
Posted
Updated 7-Apr-16 0:47am
v2
Comments
Sinisa Hajnal 7-Apr-16 6:48am    
Check the method documentation or even code, see if there are any additional properties. That is the best I can advise. I never noticed such limitation and I used the picker often.
Umesh AP 7-Apr-16 7:08am    
Hi Sinisa Hajnal, this case is rarely reproducible but we need to fix it. After using hourMin: 0, minuteMin: 0 properties, this case not occurring but is it the confirm solution??

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900