Forum Replies Created

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

  • vingy
    Participant

    Nevermind, I needed to convert the dates to jqx date objects. Works for me now.

        let jqx_start_date = new $.jqx.date(start_date);
        let jqx_end_date = new $.jqx.date(end_date);
    • This reply was modified 1 year, 1 month ago by  vingy.
    • This reply was modified 1 year, 1 month ago by  vingy.

    vingy
    Participant

    Ok, I’ve built the placeholder into the my data source and it gets get created with the correct id. Now I’m trying to update the to and from dates for the appointment. However, when I try to update the appointment date it disappears. I’ve verified through logging that the appointment still exists and has the correct date, but is no longer visible.

    The appointment is created with
    from: Thu Jan 12 2023 06:00:00 GMT-0600 (Central Standard Time)
    to: Thu Jan 12 2023 06:30:00 GMT-0600 (Central Standard Time)

    And I’m using this code to change it

        let start_date = new Date("2023-01-12 06:30:00");
        let end_date = new Date("2023-01-12 07:00:00");
    
        //update placeholder appointment
        dest_schedule.jqxScheduler('beginAppointmentsUpdate');
        dest_schedule.jqxScheduler('setAppointmentProperty', 'new', 'from', start_date);
        dest_schedule.jqxScheduler('setAppointmentProperty', 'new', 'to', end_date);
        dest_schedule.jqxScheduler('endAppointmentsUpdate');
    
        console.log(dest_schedule.jqxScheduler('getAppointmentProperty', 'new', 'from'));
        console.log(dest_schedule.jqxScheduler('getAppointmentProperty', 'new', 'to'));

    The logging shows that the dates have changes, but the appointment is gone from the scheduler.

    If I try to call ensureAppointmentVisible after the above code, it crashes the page.

    • This reply was modified 1 year, 1 month ago by  vingy.
Viewing 2 posts - 1 through 2 (of 2 total)