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.
Unfortunately, activation email could not send to your email. Please try again.

SfSchedule displays wrong appointment time using 24h timeformat

Thread ID:

Created:

Updated:

Platform:

Replies:

125189 Jul 28,2016 08:01 AM Aug 1,2016 08:15 AM Xamarin.Forms 3
loading
Tags: SfSchedule
Paul Angerer
Asked On July 28, 2016 08:01 AM

Hi,

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?



 


Paul Angerer
Replied On July 28, 2016 08:07 AM

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

But it doesn't resolve the issue.

Subburaj Pandian Veluchamy [Syncfusion]
Replied On July 29, 2016 09:24 AM

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).

Regards,
Subburaj Pandian V.







Subburaj Pandian Veluchamy [Syncfusion]
Replied On August 1, 2016 08:15 AM

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.

Regards,
Subburaj Pandian V.



 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;