how can i link the datepicker with timePicker

snippet: https://snippet.webix.com/eouh6y9x
In above Snippet i would like to link the DatePicker with the TimePicker so that
if i select today date then timepicker should not show the past time that happend in the day,
if i select Other than today date then the Timepicker should allow Complete Time to select in order to keep Appointments

Comments

  • edited September 10

    Hello @rajkumar, you can check the datepicker value right as you open the timepicker and redefine minTime with the help of define depending on the conditions: https://snippet.webix.com/fxr2vfqi.

    Please also note that i recommend using the webix.Date methods of working with dates, for instance you can compare the dates quite easily, of you can get the start of the day (which is useful especially in your case, when you need to get an accurate minDate, instead of subtracting milliseconds, using webix.Date.dayStart is more convenient).

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion