EndTime displays incorrectly
When I load a scheduled event that starts today but ends the next day then the military time of the end date time displays 13:30, which is incorrect.
Test case:
Event 1 scheduled start date = 2/28/2024 9:00 end date = 2/28/2024 17:00 .... displays correctly
Event 2 scheduled start date = 3/1/2024 13:00 end date = 3/2/2024 04:00 ....displays 13:00 - 13-30
Attachment: Syncfusion_Scheduler_295ceb12.zip
Hi Phill,
Based on the information you provided, we have investigated your query and could not replicate the reported issue on our end. We added appointments with the same date and time as you mentioned, and the appointments' times were displayed correctly.
We have attached the sample we used for testing. Please review it and let us know if you encounter the same issue. If not, please modify this sample according to your scenario to reproduce the issue you are facing. Once you have modified the sample, please revert to us with the updated sample.
Additional Information:
MAUI SfScheduler version: 24.2.8
If modifying the sample is not feasible, please share the sample in which you initially encountered this issue. Additionally, kindly provide us with the platform and device details where this issue occurred, as this information will help us better understand the problem and provide a suitable solution.
Regards,
Vidyalakshmi M.
Attachment: GettingStarted_23fd1b26.zip
Thanks for the quick response. It does indeed work. Turned out to be data related. My test was was actually
Event 2 scheduled start date = 3/1/2024 13:00 end date = 3/1/2024 04:00
having the end date before the start date
Adding this test case to the sample you provided will show the result:
string scheduledStart = "3/1/2024 1:00:00 PM";
string scheduledEnd = "3/1/2024 4:15:00 AM";
appointment.Add(new SchedulerAppointment()
{
StartTime = Convert.ToDateTime(scheduledStart),
EndTime = Convert.ToDateTime(scheduledEnd),
Subject = "My Test",
Background = Colors.Blue
});
Hi Phill,
We reviewed the code snippets you provided. The appointment will be rendered based on the given start and end times in the view. However, in the sample code you shared, the appointment's time range is invalid. The start time (3/1/2024 1:00:00 PM) is later than the end time (3/1/2024 4:15:00 AM). According to the scheduler's behavior, for an invalid appointment time, the end time value is considered as the start time plus a 30-minute duration. Therefore, the appointment will be rendered from 1:00 PM to 1:30 PM. Please adjust your sample code to set the proper end time according to your requirements.
Regards,
Vidyalakshmi M.
- 3 Replies
- 2 Participants
-
PH Phill
- Feb 28, 2024 09:56 PM UTC
- Mar 1, 2024 02:06 PM UTC