This is a migrated thread and some comments may be shown as answers.

Scrolling the calendar makes the application to crash

16 Answers 199 Views
Calendar & Scheduling
This is a migrated thread and some comments may be shown as answers.
Fabio
Top achievements
Rank 1
Fabio asked on 02 May 2015, 06:07 AM

I can't scroll the calendar view, the scroll stops at some point and makes the application to crash, also if I tab on any of the days it makes the app to crash, I have tried even only showing the calendar only in the content of the ContentPage but still the same issue.

 

    StackLayout mainView = new StackLayout
            {
                Padding = 0,
                Spacing = 0,
                VerticalOptions = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
            };

            CustomizeNavigationBar(mainView);

            _calendar = new RadCalendar
            {
                VerticalOptions = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
            };

            _calendar.DayNamesDisplayMode = DisplayMode.Show;
            _calendar.TryNavigateToLowerView(true);
            _calendar.WeekNumbersDisplayMode = DisplayMode.Show;

            _calendar.DisplayDateChanged += (s, e) =>
            {
                // do something  
            };

 

Any Ideas?

16 Answers, 1 is accepted

Sort by
0
Fabio
Top achievements
Rank 1
answered on 02 May 2015, 06:41 AM

I can see that the event DisplayDateChanged is gettin called always.

_calendar.DisplayDateChanged += (s, e) =>
            {
                // do something
                Console.WriteLine("test");
            };

 

 

0
Fabio
Top achievements
Rank 1
answered on 02 May 2015, 07:07 AM
I tried the same thing using xaml but is happening the same thing.
0
Fabio
Top achievements
Rank 1
answered on 04 May 2015, 07:57 AM
So I have found the issue and it is related of the language of the device, if  the language of the device is different than English for example Spanish, it makes the calendar to behave different than expected. Any ideas about this? 
0
Fabio
Top achievements
Rank 1
answered on 04 May 2015, 08:32 AM
I can see in the docs that localization features are not included in the Xamarin.forms Calendar is there a way we can force English language and not use the current device language?
0
Fabio
Top achievements
Rank 1
answered on 05 May 2015, 02:31 AM
Any ideas everyone?
0
Rosy Topchiyska
Telerik team
answered on 06 May 2015, 08:36 AM
Hi Fabio,

Thank you for contacting us.

We are aware of this issue, it is related to conversion of DateTime objects in different time zones. We will do our best to fix it for the next release. 

We have provided an endpoint where you can get the native calendar and further customize it as per your needs. You can take a look at this article from our online documentation that demonstrates how to extend our calendar renderer.

I hope this helps. Please, let us know if you have further questions.

Regards,
Rosy Topchiyska
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Fabio
Top achievements
Rank 1
answered on 08 May 2015, 01:23 AM

Hello Rosy 

 While trying to create a custom renderer using the code from the docs, I am having this exception.

"The given key was not present in the dictionary."

 using System;
using X.Droid;
using X.Helpers.Renderers;
using Telerik.XamarinForms.Input;
using Telerik.XamarinForms.InputRenderer.Android;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;


[assembly: ExportRenderer(typeof(CustomCalendar), typeof(CustomCalendarRenderer))]

namespace X.Droid
{
    public class CustomCalendarRenderer : CalendarRenderer
    {
        protected override void OnElementChanged(ElementChangedEventArgs<RadCalendar> e)
        {
            try
            {
                base.OnElementChanged(e);
                //var calendarControl = this.Control;
                //var events = calendarControl.EventAdapter.Events;
                //if (events.Count > 0)
                //{
                //    foreach (var ev in events)
                //    {
                //        ev.EventColor = 2;
                //    }

                //}

                //calendarControl.HorizontalScroll = Activated;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                throw;
            }
            
        }
    }
}

 

0
Rosy Topchiyska
Telerik team
answered on 12 May 2015, 07:02 AM
Hello Fabio,

I can see that you use a CustomCalendar class, but our CalendarRenderer is designed to work with RadCalendar class. If this does not help you, could you please send us a project that reproduces the issue?

I look forward to your reply.

Regards,
Rosy Topchiyska
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Mehdi
Top achievements
Rank 1
Veteran
answered on 23 Dec 2020, 10:53 PM

Hi, 

I am encountering this problem too. While reviewing the comments, I saw that on 06 May 2015 this bug was told to be fixed. So, apparently it hasn't been resolved yet or what?

Indeed, this RadCalendar was the main reason why we decided to buy the complete DevCraft UI package but unfortunately I am continuously having challenges with this. 

I hope a solution is provided for this one at least..

0
Didi
Telerik team
answered on 25 Dec 2020, 07:45 AM

Hello Mehdi,

Could you please elaborate more on which platform the issue occurs? 

We have been reported issues when timezone is changed: 
https://feedback.telerik.com/xamarin/1366195-calendar-android-an-exception-is-thrown-if-the-selectiondate-property-is-set-to-datetime-minvalue-in-specific-timezones  status of this item is Done

https://feedback.telerik.com/xamarin/1365999-calendar-appointments-are-shown-with-offset-from-the-original-date-depending-on-the-device-local-timezone status Done

Please attach a stack trace of the exception and steps to reproduce the issue. 

I look forward to your reply.

Regards,
Didi
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Mehdi
Top achievements
Rank 1
Veteran
answered on 04 Jan 2021, 07:02 PM

Hi Didi,

Thank you for the update. As far as I've investigated, none of those two cases comply with my case. I must add that the problem occurs for UWP, but not for Android.
In addition to the Call Stack, I have also attached the Output and an Event log, which hope to be useful.

P.s. unfortunately as I couldn't attach text or zip files, I had to send their screenshots.

0
Mehdi
Top achievements
Rank 1
Veteran
answered on 04 Jan 2021, 11:49 PM

And I must add that depending on the main page's size, sometimes this is "clicking on a time slot" that results is crash, not scrolling.

I.e. when the application's window size is smaller than half, scrolling results in crashing. Otherwise, clicking on a time slot results in crashing.

0
Didi
Telerik team
answered on 05 Jan 2021, 03:02 PM

Hello Mehdi,

Thank you for the provided information and images. 

I have tried to reproduce the issue on UWP but without a success. I changed the windows timezone,  changed the calendar view mode, changed the application window size, clicking on the calendar time slot, scrolling the calendar but no exception.

Could you please open a support ticket and attach a video with the exact steps to reproduce the issue and a sample project where the exception occurs? This will help us research the case further. 

From the provided images with the stack trace, you will notice that the Telerik is not mentioned. The unhandled exception doesn't tell us what is the exact exception. Could you please do the following: 

1. open Debug Menu -> Windows -> select Exceptions
2. In the Exception Settings tab, check the “Common Language Runtime Exceptions” so the check mark to be visualized.

 

3. Run your code and check what will be the exact exception. 

 

Regards,
Didi
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Mehdi
Top achievements
Rank 1
Veteran
answered on 05 Jan 2021, 09:54 PM

Hi Didi,

Thank you but I had already done that, not only for the “Common Language Runtime Exceptions”, but also for all other exception types too, and nothing new was revealed. I took a screenshot though, which might be helpful. If not, would you try set an appropriate time to connect to my system (e.g. via TeamViewer) to observe the problem in real-time please?

 
0
Lance | Manager Technical Support
Telerik team
answered on 05 Jan 2021, 10:51 PM

Hi Mehdi,

This is a public forum thread, so it isn't appropriate for you to record a video and attach it here. Additionally, you do not have a Remote Web Assistance technical support package, so we do not have the option to schedule and create a meeting for you with the development team involved.

The output you have shared does not show any exception fault pointing to a Telerik API or assembly (combase.dll is not a Telerik assembly).

Further Investigation

Can you please take the following steps so that we can continue investigating:

1. Please follow Didi's request (critical)

2. Open a new Support Ticket here and attach the project + video file (if it it too large, upload it to a service like OneDrive/Dropbox and share the download link instead)

3. Include all important information about the app environment. I'm not sure why the application is using x86 emulation on an x64 machine (SysWOW64), explaining the exact deployment and running condition in the video will help

 

Remote Web Assistance

After the team reviews the code and video, we will be able to make a better determination as to what steps to take next. As I mentioned earlier, there is nothing in that crash output to indicate that it originates in the RadCalendar APIs.

However, that doesn't mean the crash isn't happening due to a lifecycle situation surrounding the Calendar use. In this case, the development team may want to do an RWA to understand more.

In this case, I will set up a complimentary Remote We Assistance meeting with you, Didi and the development team. Please follow all of the above instructions before we can even get to this point.

Regards,
Lance | Manager Technical Support
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Mehdi
Top achievements
Rank 1
Veteran
answered on 07 Jan 2021, 01:31 AM

Hi Lance,

Thanks so much for the update. The ticket has been created.

Warm regards.

 
Tags
Calendar & Scheduling
Asked by
Fabio
Top achievements
Rank 1
Answers by
Fabio
Top achievements
Rank 1
Rosy Topchiyska
Telerik team
Mehdi
Top achievements
Rank 1
Veteran
Didi
Telerik team
Lance | Manager Technical Support
Telerik team
Share this question
or