SfSchedule.MoveToDate setter causes System.DivideByZeroException - ISSUE

When using the schedule on an android phone with RTL layout enabled(Phone language is Hebrew) and attempting to move to a certain date an exception is thrown.

The situation DOES NOT occur when the phone layout is LTR(Phone language is EN(us)).

Exception Log:

[0:] System.DivideByZeroException: Attempted to divide by zero.
  at Com.Syncfusion.Schedule.DateTimeHelper.GetCalendarIndexForRTL (System.Int32 calendarIndexForRTL, System.Int32 visibleDatesCount) [0x00000] in <58b55f93675e45ddad47d2f9c2501e18>:0
  at Com.Syncfusion.Schedule.ViewHeaderLayout.Update (Com.Syncfusion.Schedule.SfSchedule schedule, System.Collections.ObjectModel.ObservableCollection`1[T] visibleDates) [0x0001f] in <58b55f93675e45ddad47d2f9c2501e18>:0
  at Com.Syncfusion.Schedule.ParentDayLayout.UpdateHeaderValues (System.Collections.ObjectModel.ObservableCollection`1[T] visible_Dates) [0x00006] in <58b55f93675e45ddad47d2f9c2501e18>:0
  at Com.Syncfusion.Schedule.SfSchedule.UpdateViewDates (System.Int32 index, System.Collections.ObjectModel.ObservableCollection`1[T] dates) [0x0008e] in <58b55f93675e45ddad47d2f9c2501e18>:0
  at Com.Syncfusion.Schedule.SfSchedule.UpdateDates (Java.Util.Calendar currentViewDate) [0x00056] in <58b55f93675e45ddad47d2f9c2501e18>:0
  at Com.Syncfusion.Schedule.SfSchedule.OnMoveToDateChanged (Java.Util.Calendar value) [0x0003a] in <58b55f93675e45ddad47d2f9c2501e18>:0
  at Com.Syncfusion.Schedule.SfSchedule.set_MoveToDate (Java.Util.Calendar value) [0x0003d] in <58b55f93675e45ddad47d2f9c2501e18>:0
  at Syncfusion.SfSchedule.XForms.Droid.SfScheduleMapping.OnSfSchedulePropertiesChanged (System.String propertyName, Syncfusion.SfSchedule.XForms.SfSchedule formSfSchedule, Com.Syncfusion.Schedule.SfSchedule nativeSchedule, Syncfusion.SfSchedule.XForms.Android.SfScheduleRenderer scheduleRenderer) [0x00cc3] in <58b55f93675e45ddad47d2f9c2501e18>:0
  at Syncfusion.SfSchedule.XForms.Android.SfScheduleRenderer.OnElementPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x00030] in <58b55f93675e45ddad47d2f9c2501e18>:0
  at (wrapper delegate-invoke) .invoke_void_object_PropertyChangedEventArgs(object,System.ComponentModel.PropertyChangedEventArgs)
  at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:211
  at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:359
  at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent) [0x00114] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:443
  at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x00173] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:379
  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess) [0x00042] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:316
  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:293
  at Syncfusion.SfSchedule.XForms.SfSchedule.set_MoveToDate (System.DateTime value) [0x00000] in <3acab42f46fa49b8b9945cd6b306c341>:0
  at


I have a SfCalendar above the SfSchedule(both are inside a scroll view which is inside a stacklayout), was trying to move the Schedule date when a date is selected in the calendar. SfSchedule is set to DAY VIEW.

Code Sample:

Schedule.MoveToDate =  Calendar.SelectedDate.Value;



1 Reply

SP Subburaj Pandian Veluchamy Syncfusion Team August 19, 2019 01:23 PM UTC

Hi Ethan, 
 
Thank you for contacting Syncfusion support. 
 
We have checked and seen that you have created incident under your account for this same query with Schedule. Please follow-up with the incident for further updates regarding the same. 
 
Regards,
Subburaj Pandian V  


Loader.
Up arrow icon