Page 1 of 1

Users reporting data issues

Posted: Mon Mar 20, 2023 4:29 pm
by orthobridge

Hi,
I'm using a custom pop-up to create an add event dialog. It's supposed to take the date form the underlying date selected on the calendar. Unfortunately, users are complaining that it's not always the selected date and the event date are not always the same. Is there an event I should call to ensure the data dbl-clicked is the same as the calendar date. I've been sent an image which clearly shows the issue but I cannot replicate it.

Any help greatly appreciated
-John

Here's the code - is there some sync event I can call to ensure it's aligned to background ?

       
calendar.on('scheduleDblClick', (_e) => { console.log(_e); _setAppointmentID(''); _setStartDate(_e.date); _setSelectedChair(_e.resourceRecord.data.id); _setChairUserIds(_e.resourceRecord.data.userIds.toString()); _setChairTitle(_e.resourceRecord.data.title); dmx.parse('modal_event_editor.show()'); } }); // init our local time controls function _setStartDate(_d) { console.log(_d.getTimezoneOffset()); dmx.parse("var_start_date.setValue('" + _d.toISOString() + "')"); dmx.parse("var_start_time_hours.setValue('" + _d.getHours() + "')"); dmx.parse("var_start_time_mins.setValue('" + _d.getMinutes() + "')"); dmx.parse("var_utc_offset.setValue('" + _d.getTimezoneOffset() + "')"); }

Re: Users reporting data issues

Posted: Tue Mar 21, 2023 11:31 am
by Animal

You'd have to see where that date is coming from. It's not from the scheduleDblClick event.

But it seems that there's a bug in that the schedule<event> events do not get through to the Calendar level in ResourceView, so whatever workaround is being used to show that dialog there is making a mistake in how it decides on the date.


Re: Users reporting data issues

Posted: Tue Mar 21, 2023 11:33 am
by Animal

Re: Users reporting data issues

Posted: Tue Mar 21, 2023 11:35 am
by orthobridge

Ok, thanks. I've sorted it out. It was intermittent and related to the event dialog caching the date value occasionally.