Wrong time zone of Daygrid Add Event dialog (Calandar Report)

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
vuongduongquoc
User
Posts: 133

Wrong time zone of Daygrid Add Event dialog (Calandar Report)

Post by vuongduongquoc »

When i go to Daygrid and i press the mouse and drag it, let say i drag the mouse from 7 to 9.5 then the Add event popup. The time will be automaticly filled in but with different time zone.
It show :
Start: 03/02/2023 14:00 (It should be 03/02/2023 07:00)
End: 03/02/2023 16:30 (It should be 03/02/2023 09:30)
It means the time has +7 hours for Vietnam local time (GMT+7).
How can i change this setting?
Thanks


vuongduongquoc
User
Posts: 133

Post by vuongduongquoc »

i've updated the latest template and using v2023.9.
It is not real time issue. It is the time in add event page.
When i go to the calendar to view it in one day mode it will show a time grid from 00 to 23 hours. Then i press the mouse and drag it, let say i drag the mouse from 1:00 to 2:30 then the Add event popup. The time will be automaticly filled in but with different time zone.
It show :
Start: 04/02/2023 08:00 (If correct It should be 04/02/2023 01:00)
End: 04/02/2023 09:30 (If correct It should be 04/02/2023 02:30)
It means the time has been automaticly +7 hours in the ADD Page. So i have to edit it back to 04/02/2023 01:00 for Start time and 04/02/2023 02:30 for End time.

Thanks


mobhar
User
Posts: 11703

Post by mobhar »

Yes, you're right. If a new event is added from Daygrid Add, the time in Modal dialog window will display the time that according to timezone that used by the Calendar Report. We have to change the time in Add form as you mentioned above.

So here is the solution for your case above. Just add this code into Page_Head server event:

<script>
    ew.calendarOptions.fullCalendarOptions.timeZone = "UTC+7"; // define to your own timezone
</script>

After that, re-generate Layout.php file, and try again.


vuongduongquoc
User
Posts: 133

Post by vuongduongquoc »

Thanks. It's fixed.


Post Reply