mendixlabs/CalendarWidget

Mx 7.11 Bugs - Date changes back one day when saving

lambatross opened this issue · 9 comments

After I open a calendar item, I save/close it without making any changes and the calendar item switches dates to be a day earlier than it was when I initially opened it.

Hey Jelte,

How's the fix for this issue coming along? Got a timetable you can share?

I am working on a bugfix which is related to this issue. Could you test a (not-released) version of the widget for me?

https://github.com/mendix/Calendar/raw/version6-refactoring/dist/Calendar.mpk

This will be version 6 when all issues has been resolved. This version right now is not production ready yet

Hi Jelte - Thanks for providing this update. It looks like part of the issue has been addressed.

  1. When opening the schedule item and saving, the date does not change. Pass.
  2. When dragging and dropping the schedule item, the date still changes to a day earlier than expected. Fail.

For both of the above situations, the same microflow is being called, so it appears this is still a bug in the widget. Please let us know if you need any additional information.

I am aware of the bug, thanks for testing. I have this same bug open for Support. I am working on resolving the issue

I think I have found the issue in the code. On Change (it did this on click as well) it will change the date and time. It seems to ignore the previous set time and just set this to 00:00. It should only change the date (if you are on a Month view. For weeks it should be different, because you can change the time by dragging it through a day).

Lots of edge cases (Timezones are a whole different story), but I'll try to come up with a fix soon.

I will probably revert the change, because this boils down to an implementation issue, not an issue with the widget itself. Here's the short summary I wrote to Support:


I'm analyzing the issue further and it comes down to some implementation failures. I do think we need to better document it, but it comes down to this:

  • The client has implemented a Sub microflow that does some validation but also changes the date/time in that. The widget takes care of changing the date/time, so this shouldn't have to be done in a sub microflow.
  • The client also uses the allDayAttribute. In my research I found out that the widget will always reset the time to 00:00 UTC when you will drag the event around in a month/week view, if the event is an all-day event. So, disabling the all-day attribute in an event will prevent this.

These implementation issues should be resolved in the project itself. I will see if I can do something about the timezones, because this might be a problem as well.

Can you tell what the timezones are that are used, reproducing this issue?

  • Timezone set in the project (Project settings -> Runtime -> Default time zone)
  • Timezone in the browser
  • Timezone set in the widget (Widget -> View settings -> Time zone)

This will help to check for the issues regarding timezones. I think it has to do with that.

@rickyv3 & @lambatross, can you share with me the details in my previous question? I am trying to figure out what to do with timezones