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. Image for the cookie policy date
close icon

MoveToDate causes iOS to crash

Hi support,

in my project I use sfCalendar instead of the standard calendar of iOS (which is ugly) and Androd.

I use bindable properties to set and get the selected date to and from the sfCalendar.

I recently added a bind to the property MoveToDate alongside other properties, such as SelectedDate:

                        <sfl:SfCalendar IsVisible="{Binding IsPopupStartDate, Source={x:Reference popuplayout}}"

                                        SelectedDate="{Binding TempStartDate}" MoveToDate="{Binding TempStartDate}"

                                        MinDate="{Binding MIN_BOOKING_DATE}" MaxDate="{Binding MAX_BOOKING_DATE}" />

On iOS, as soon as the sfCalendar is shown, the app crashes, meanwhile on Android I have no problems.

If I remove MoteToDate it works on both platform, but obviously the sfCalendar doesn't move to the SelecttDate if it is not today.

I'm using SyncFusion controls version 19.4.0.56, Xamarin Forms 5.0.0.2478 and Xamarin iOS 4.0.30319.

I tried SyncFusion controls version 20.1.0.47 but the problem remains.


Any suggestions?


Thank


5 Replies

SS SaiGanesh Sakthivel Syncfusion Team March 28, 2023 11:10 AM UTC

Hi Davide,


#Regarding SfCalendar crash when setting the MoveToDate and SelectedDate property

We could not replicate the reported scenario from our end. We have prepared the sample as per the given information and checked the sample with iPhone 8 simulator with iOS 16.1 version by binding the same date for the selected date and MoveToDate property from our side. Please refer to the tested sample and video in the attachment.


Please check the sample and let us know if you still facing the same issue? If not, please modify the sample based on your scenario and revert us back with the following details,

.

  • Share the issue replicated steps or videos.

  • Share the issue replicated device configuration.


It will be helpful for us to check on it and provide you with the solution as soon as possible.


Regards,
SaiGanesh Sakthivel


Attachment: SampleWithVideo_8cf684cb.zip


DA Davide Accogli replied to SaiGanesh Sakthivel April 3, 2023 09:37 AM UTC

I saw the code and the video.

Can you please test using SyncFusion version 19.4.0.56 instead of 21.1.35?





SS SaiGanesh Sakthivel Syncfusion Team April 4, 2023 11:53 AM UTC

Davide,


#Regarding SfCalendar crash when setting the MoveToDate and SelectedDate property

We could not replicate the reported scenario from our end. We have checked the sample with the mentioned version (19.4.0.56) by binding the same date for the selected date and MoveToDate property from our side. Please refer to the tested sample and video in the attachment.


Please check the sample and let us know if you still facing the same issue? If not, please modify the sample based on your scenario and revert us back with the following details,

.

  • Share the issue replicated steps or videos.


It will be helpful for us to check on it and provide you with the solution as soon as possible.


Attachment: SampleAndVideo_a53b6ac8.zip


DA Davide Accogli April 5, 2023 05:55 AM UTC

I was able to find the problem and a workaround for this.

If the bound DateTime object to MoveToDate has value default(DateTime), it causes a crash on iOS, meanwhile it doesn't on Android. I sorted out the problem by initializing the DateTime object to a valid date.

As often, I have a different behavior on different platforms.



SS SaiGanesh Sakthivel Syncfusion Team April 6, 2023 08:50 AM UTC

Hi Davide,


#Query 1: #Regarding SfCalendar crash when setting the MoveToDate and SelectedDate property

We are glad to know that you have achieved your requirement from your end.


#Query 2: Regardig As often, I have a different behavior on different platforms.

We need more details to check the reported scenario from our side. Please share the following details, which will help us check on it and provide you with the solution as soon as possible. 


  • Share the calendar code snippet used in the sample.

  • Share the DateTime value used to bind to the SelectedDate and MoveToDate property.

  • Share the issue replicated videos.

  • Share the issue replication procedure.


Regards,

SaiGanesh Sakthivel


Loader.
Live Chat Icon For mobile
Up arrow icon