Is there a way to set max and min time with the date and time picker
Is there a way to set max and min time with the date and time picker
I know that one can set min and max date using: minDate and maxDate but is there a way to set the time for that also? I tried:
{
label:'Appointment date and time',
name:'applicationForm.interviewDateTime',
type: 'datetime',
def: function () { return new Date(); },
format: 'DD/MM/YYYY h:mm A',
fieldInfo: 'Please click in the text box to reveal the date picker. All appointments should be 2 days in the future.',
opts: {
minutesIncrement: 20,
disableDays: [ 0, 6 ],
minDateTime: minDateTime, //today with a min time
maxDateTime:'maxDateTime //today with a max time
},
className:'required'
},
it did not work, however. I still got the default time. Is there a way to do this?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi @INTONE ,
Yep, Editor 1.7.0 introduced the
hoursAvailable
option todatetime
- this should do the trick for you.Cheers,
Colin
Thank you.