javascript - How to set minTime without closing the current datetimepicker? -
i'm using datetimepicker trent richardson; i'd give users calendar, both dates , times restricted differently each supplier; e.g. supplier x may available mon 9am-5pm , wed 3pm-5pm - i'd users able select dates/times within these ranges.
the way i've done restrict day of week via beforeshowday; using onselect update mintime , maxtime. however:
- once mintime updated, datetimepicker window close. i'd remain open ideally; otherwise @ least trigger window re-open automatically. i've tried .trigger('click') doesn't seem work
- is possible have more 1 timeslot per day - e.g. allow user select 9am-11am, , 2pm-3pm on mondays
- is there smarter way overall?
relevant code below
onselect: function(datetext, inst){ var ele = $(this); ele.datetimepicker("option", "mintime", '11:00 am'); });
wiki
Comments
Post a Comment