TimeInterval and StartHour/EndHour

I currently have the TimeInterval of the scheduler set to one day like this

Schedule.TimeInterval = 1440;

This works, but whenever I also set the StartHour and EndHour like this:

new TimelineViewSettings() { StartHour = 8, EndHour = 16 };

issues start occuring with the scaling. It seems the TimeInterval is ignored.

This issue occurs both on Xamarin.iOS and Xamarin.Android.

Is there a way to combine TimeInterval and StartHour/EndHour?


3 Replies 1 reply marked as answer

SS SaiGanesh Sakthivel Syncfusion Team December 29, 2021 12:53 PM UTC

Hi Daniel, 
 
As per the implementation of SfSchedule, the one-day time slot TimeInterval is calculated by multiplying the total time slot available by 60. For example, the default view has a total of 24 time slots, and the time interval for one day will be 1440 (24 * 60). If we set the start hour as 8 and the end hour as 16, that means a total of 8 time slots will be rendered in the view. As a result, TimeInterval should be 480 ((end hour – start hour) * 60). 
 
Code snippet 
SFSchedule.ScheduleView = SFScheduleView.SFScheduleViewTimeline; 
var timelineViewSettings = new TimelineViewSettings(); 
timelineViewSettings.StartHour = 8; 
timelineViewSettings.EndHour = 16; 
SFSchedule.TimelineViewSettings = timelineViewSettings; 
SFSchedule.TimeInterval = (timelineViewSettings.EndHour - timelineViewSettings.StartHour) * 60; 
 
Please let us know if you have any concerns. 
 
Regards,
SaiGanesh Sakthivel
 


Marked as answer

DK Daniel Knippers January 4, 2022 08:38 AM UTC

Thank you very much. Changing the interval to match the starthour/endhour works perfectly!



MS Muniappan Subramanian Syncfusion Team January 5, 2022 05:57 AM UTC

Hi Daniel, 
 
We are glad that our solution meets your requirement. Please let us know if you need any further update. As always, we are happy to help you out.  
 
Regards,  
Muniappan S 


Loader.
Up arrow icon