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() + "')");
}