jQuery UI Widgets Forums Scheduler Fix for scheduler to show correct initialised date on jqxDateTimeInput calendar

This topic contains 1 reply, has 1 voice, and was last updated by  barney 7 months, 4 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • barney
    Participant

    Currently the date selector calendar button (jqxDateTimeInput widget) always shows “today” as selected even though scheduler is initialised with a specific date.

    The issue is that every time the toolbar is rendered a new jqxDateTimeInput instance is created with no date set which it then defaults to ‘today’.

    Navigating using the calendar widget or the previous/next buttons correctly calls navigateTo internal method which also changes the jqxDateTimeInput value. However if for any reason you do anything that has to re-render the scheduler (and therefore the toolbar), it reverts widget back to ‘today’

    The correct fix for this seems to be setting the ‘value’ option on the jqxDateTimeInput to the getVisibleDate() each time it’s created in the _renderToolbar.

    EG on line 2959 of v19 jqxscheduler.js add “value: that.getVisibleDate().toDate()” to the jqxDateTimeInput settings.

    Barnaby


    barney
    Participant

    I’ve since changed this to that.date.toDate() as startView date isn’t necessarily the selected date and visibledate is mostly that.date, except for the month view which pushes it beginning of the month

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.