Hi,
I am facing the UWP app crash when trying to touch the year on the calendar header. I can also reproduce it on your example code (https://github.com/SyncfusionExamples/xamarin-calendar-getting-started)
It happens when you specify Calendar.MaxDate but you don't specify Calendar.MinDate. No matter if you set it through Behaviors class as you do in your example or if you do that directly through the property of the calendar in .cs code or XAML using bindable property.
- I verified that it works well on Android and iOS.
- As a workaround I need to set MinDate too.
Thanks.
Ivo
Attachment: Exception I can see
System.ArgumentOutOfRangeException: Year, Month, and Day parameters describe an un-representable DateTime.
at System.DateTime.DateToTicks(Int32 year, Int32 month, Int32 day)
at Syncfusion.UI.Xaml.Controls.Input.ScrollPanel.GetYearRange(DateTime dateTime)
at Syncfusion.UI.Xaml.Controls.Input.SfCalendar.ValidateDateYear(DateTime dateTime)
at Syncfusion.UI.Xaml.Controls.Input.SfCalendar.ValidateYear(DateTime dateTime)
at Syncfusion.UI.Xaml.Controls.Input.SfCalendar.UpdateNavigationButtonSta - System.ArgumentOutOfRangeException: Year, Month, and Day parameters describe an un-representable DateTime.
at System.DateTime.DateToTicks(Int32 year, Int32 month, Int32 day)
at Syncfusion.UI.Xaml.Controls.Input.ScrollPanel.GetYearRange(DateTime dateTime)
at Syncfusion.UI.Xaml.Controls.Input.SfCalendar.ValidateDateYear(DateTime dateTime)
at Syncfusion.UI.Xaml.Controls.Input.SfCalendar.ValidateYear(DateTime dateTime)
at Syncfusion.UI.Xaml.Controls.Input.SfCalendar.UpdateNavigationButtonStateOnYear(DateTime dateTime)
at Syncfusion.UI.Xaml.Controls.Input.SfCalendar.OnDisplayYearChanged(DependencyPropertyChangedEventArgs e)
at Syncfusion.UI.Xaml.Controls.Input.SfCalendar.OnDisplayYearChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
at Windows.UI.Xaml.DependencyObject.SetValue(DependencyProperty dp, Object value)
at Syncfusion.UI.Xaml.Controls.Input.SfCalendar.ReUpdateYearView(DateTime date)
at Syncfusion.UI.Xaml.Controls.Input.SfCalendar.OnViewModeChanged(DependencyPropertyChangedEventArgs e)
at Syncfusion.UI.Xaml.Controls.Input.SfCalendar.OnViewModeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
at Windows.UI.Xaml.DependencyObject.SetValue(DependencyProperty dp, Object value)
at Syncfusion.UI.Xaml.Controls.Input.SfCalendar.PartMonth_Click(Object sender, RoutedEventArgs e)
Hi Muniappan,
thank you and to your team for quick resolution of that issue.
Ivo