Schedule - Start/End date not accurate when drag/drop? (Timezone issues?)

I have an example of a calendar event whose dates do not appear to work correctly.

When I load this item from my web API, it returns the following start and end times:

"startTime": "2022-09-11T00:00:00",

"endTime": "2022-09-17T00:00:00",


However, when it binds to the scheduler, it shows up as Starting on Sep 10. I assume this is because my local timezone is GMT-0400, which, when applied to the startTime of 2022-09-11T00:00:00 would be 2022-09-10T20:00:00-0400, correct? Is this why the event appears on Sep 10 instead?


Next, I will try to drag and drop the item to September 11.

Here is a screenshot of where I drag/drop the item to in the scheduler. Notice I am dropping it on September 11 and its end date appears to be "the end of September 17" (or Sep 18 at midnight, I guess).



However, the start and end times sent to the server are:

"startDate": "2022-09-12T00:00:00.000Z",

"endDate": "2022-09-18T00:00:00.000Z",


Why is the calendar sending Sep 12 (UTC) to Sep 18 (UTC) to the server?


1 Reply

VD Vinitha Devi Murugan Syncfusion Team September 8, 2022 01:21 PM UTC

Hi Justin,


Greetings from Syncfusion Support.


Q1: We have validated your reported query and let you know that by default, the start and end time of the appointments are calculated and processed in UTC time at server side. If you want to display the events as it is from the database we suggest you to setting timezone as UTC to the scheduler. Please refer the following UG for the same.


https://ej2.syncfusion.com/react/documentation/schedule/timezone/#display-events-on-same-time-everywhere-with-no-time-difference

https://ej2.syncfusion.com/react/documentation/schedule/timezone/#scheduler-with-no-timezone


Q2:  We have checked your reported drag and drop issue by preparing sample with our local system timezone as Indiana(East) (UTC -5:00). But appointment end time shown correctly at our end. Please refer below video demo and working sample.


Video Demo: https://www.syncfusion.com/downloads/support/directtrac/general/ze/DRAGIS~1-1039930422

Sample : https://stackblitz.com/edit/scheduler-timezone?file=index.js

Service: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Service-156576641



Kindly refer the above sample. If you still facing the same problem share us the below details to serve your better. 

  • Share your local system timezone detail
  • Share scheduler timezone detail
  • Share complete schedule rendering code.
  • Share your startup.cs file
  • Replicate your problem in the above shared sample or
  • Share a sample illustrating the problem which would help us to proceed further.

Regards,

Vinitha



Loader.
Up arrow icon