I'm seeing some unexpected and unintuitive behaviour regarding the saving of the End By Date.
There seems to be some faulty logic that will always increment the user selected date by 1 day (or to the next day) therefore if the user keeps viewing the appointment data and doesn't update anything but clicks save, the End By Date will always increment by 1.
The bug seems to be in the _getRange function of the advanced form, which is easily enough modified since i am using the custom advanced form approach.
The code in question is as follows in the getRange js method:
The problem is that you take the date the user selected and you add an entire day which sets it to midnight, the beginning of the next day all the time so if the user goes to just view the data in edit mode, doesn't change anything but clicks save, as most users will, the end by date shouldn't change but in the current case it will.
It seems to me you need to subtract a second to always put the end by date at the end of the user selected date (just before the day rolls over).
There seems to be some faulty logic that will always increment the user selected date by 1 day (or to the next day) therefore if the user keeps viewing the appointment data and doesn't update anything but clicks save, the End By Date will always increment by 1.
The bug seems to be in the _getRange function of the advanced form, which is easily enough modified since i am using the custom advanced form approach.
The code in question is as follows in the getRange js method:
if (!this._getElement("AllDayEvent").checked) |
range.set_recursUntil($DateTime.add(range.get_recursUntil(), timePerDay)); |
The problem is that you take the date the user selected and you add an entire day which sets it to midnight, the beginning of the next day all the time so if the user goes to just view the data in edit mode, doesn't change anything but clicks save, as most users will, the end by date shouldn't change but in the current case it will.
It seems to me you need to subtract a second to always put the end by date at the end of the user selected date (just before the day rolls over).