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
I can see that the event DisplayDateChanged is gettin called always.
_calendar.DisplayDateChanged += (s, e) =>
{
// do something
Console.WriteLine("test");
};
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.
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;
}
}
}
}
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.
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..
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
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/.
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.
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.
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/.
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?
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/.
Hi Lance,
Thanks so much for the update. The ticket has been created.
Warm regards.