[bug] calendar + time

calendarTime is showing the first day of the month rather than the current one.

How can i workaround that ?


Good day @franck34,

Thank you for the detailed report! We can identify this as a missing feature since only time is expected to be displayed there. We will fix it in near realises :slight_smile:

Now, as workaround, you can create a custom Webix component, based on caledar. And place created component inside of datepicker.
The needed string creates with calendarTime_setter(format). By default, in the calendar code, the calendarTime_setter takes a string with a format mask and returns a function that converts the date to a string using this mask. We need it, so:

*the original calendarTime_setter is called through prototype so that that private property is correctly assigned and the function for formatting is returned to us;
*we supplement this function: the format remains the same, but we correct date before calling the formatting and return the already two-layer construction

Please, check out the snippet with example: Code Snippet

Thank you @NatashaS, calendarTime_setterwas the key :wink:

1 Like