UWP: App crash when touching the year when MaxDate set

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)

4 Replies 1 reply marked as answer

MS Muniappan Subramanian Syncfusion Team November 22, 2021 10:44 AM UTC

Hi Ivo Snoza, 
 
Thank you for contacting Syncfusion support.  
 
We have fixed the mentioned issue “App crash issue while tapping the year when MaxDate set in SfCalendarand the patch for the issue fix is following by. Before installing the patch, kindly remove bin and obj folders from all the projects of solution and clear NuGet cache. 
 
 
 
 
Kindly find the below link to clear NuGet cache,
https://www.syncfusion.com/kb/6987/how-to-clear-nuget-cache   Before installing the patch, kindly remove bin and obj folders from all the projects of solution and clear NuGet cache.
 
 
Installation Direction:       
{Syncfusion Installed location} \Essential Studio\19.3.0.53\Xamarin\lib\netstandard\Syncfusion.SfCalendar.XForms.dll             
{Syncfusion Installed location} \Essential Studio\19.3.0.53\Xamarin\lib\android\Syncfusion. SfCalendar.XForms.Android.dll             
{Syncfusion Installed location} \Essential Studio\19.3.0.53\Xamarin\lib\ios\Syncfusion. SfCalendar.XForms.iOS.dll             
{Syncfusion Installed location} \Essential Studio\19.3.0.53\Xamarin\lib\uwp\Syncfusion. SfCalendar.XForms.UWP.dll    
         
Disclaimer:     
Please note that we have created this patch for version 19.3.0.53 specifically to include the issue. We will include the issue fix in our upcoming Weekly NuGet release. We appreciate your patience until then.  
 
Regards,    
Muniappan S 


Marked as answer

IS Ivo Snoza November 22, 2021 12:06 PM UTC

Hi Muniappan,

thank you and to your team for quick resolution of that issue.


Ivo



SS SaiGanesh Sakthivel Syncfusion Team November 23, 2021 08:55 AM UTC

Hi Ivo,  
  
Thank you for the update.  
  
We will let you know once the release rolled out. We appreciate your patience until then.  
  
Regards,
SaiGanesh Sakthivel
 



SS SaiGanesh Sakthivel Syncfusion Team November 30, 2021 02:21 PM UTC

Hi Ivo, 
 
Thank you for the patience. 
 
#Regarding App crash issue while tapping the year when MaxDate set in SfCalendar 
We have fixed the reported issue and included the issue fix in our latest Weekly NuGet release update version 19.3.0.56 onwards which is available for download (nuget.org).  
 
We thank you for your support and appreciate your patience in waiting for this update. Please get in touch with us if you would require any further assistance.  
  
Regards,  
SaiGanesh Sakthivel  


Loader.
Up arrow icon