Jquery TimePicker : How to dynamically change parameters
Posted
by
mad.geek
on Stack Overflow
See other posts from Stack Overflow
or by mad.geek
Published on 2012-06-09T04:34:22Z
Indexed on
2012/06/09
4:40 UTC
Read the original article
Hit count: 514
I am using a Jquery Timepicker .
I have two input fields - to Accept times .
<input id="startTime" size="30" type="text" />
<input id="endTime" size="30" type="text" />
I am using a Jquery UI timer as per documentation here - http://jonthornton.github.com/jquery-timepicker/
$('#startTime').timepicker({
'minTime': '6:00am',
'maxTime': '11:30pm',
'onSelect': function() {
//change the 'minTime parameter of #endTime <--- how do I do this ?
}
});
$('#endTime').timepicker({
'minTime': '2:00pm',
'maxTime': '11:30pm',
'showDuration': true
});
I want that when the first timePicker is selected , the 'minTime' parameter for the second gets changed . Basically I am trying to collect the start time and end time for certain activity . And I want that the second input box shows the options from the value of the first input field (start time ) itself .
© Stack Overflow or respective owner