We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

SfSchedule displays wrong appointment time using 24h timeformat


i have a problem when displaying a ScheduleAppointment from e.g 2016-07-28 10:00:00 to 2016-07-29 00:00:00.

I'm parsing the datetime with 24 hour time format:

DateTime startTime = DateTime.ParseExact(reservation.starttime_dt, "yyyy-MM-dd HH:mm:ss",
                                    System.Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.None);
                DateTime endTime = DateTime.ParseExact(reservation.endtime_dt, "yyyy-MM-dd HH:mm:ss", System.Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.None);
reservationSlot.StartTime = startTime;
reservationSlot.EndTime = endTime;

The scheduler is displaying a 1 hour timeslot but it should display the time from 10:00-00:00 (midnight). So the appointment gets scheduled falsely from 10:00 to 11:00.

Also when manually setting datetime as following:

DateTime endTime = new DateTime(startTime.Year, startTime.Month, startTime.Day, 0, 0, 0);

The scheduler displays again starttime + 1 hour, instead of 10:00-00:00.

Any suggestions how to fix this?


3 Replies

PA Paul Angerer July 28, 2016 12:07 PM UTC

It should be:
DateTime endTime = new DateTime(startTime.Year, startTime.Month, startTime.Day + 1, 0, 0, 0);

But it doesn't resolve the issue.

SP Subburaj Pandian Veluchamy Syncfusion Team July 29, 2016 01:24 PM UTC

Hi Paul,

We are analyzing on this query with your provided information and we will let you know the status of this in one business day (Aug 1, 2016).

Subburaj Pandian V.

SP Subburaj Pandian Veluchamy Syncfusion Team August 1, 2016 12:15 PM UTC

Hi Paul,

We are unable to reproduce the mentioned issue with “Setting ScheduleAppointment StartTime and endTime in SfSchedule Xamarin Forms” by our side. We have prepared a simple sample for the same. Please find the sample link below.

Sample Link: ScheduleSample_Appointment 

If the provided sample does not meet your requirement, please modify the provided sample and its replication procedure along with screenshots (if possible) to help us analyze the problem and provide the appropriate solution.

Subburaj Pandian V.


Live Chat Icon For mobile
Up arrow icon