This is a migrated thread and some comments may be shown as answers.
Glitches in day view
8 Answers 15 Views
This is a migrated thread and some comments may be shown as answers.
Ian
Top achievements
Rank 1
Ian asked on 08 Nov 2017, 07:28 PM

I have bound some appointments to the calendar and in day view I'm finding on the iPhone that as I step from day to day, appointment shapes appear and disappear from the day cells. Also, a whole day in the vertical area of the screen will be covered in a dark shade and the actual appointments which should be there will not be there at all or will be covered up by the dark shade.

Is there a way of avoiding these glitches? Otherwise this is too buggy to use.

8 Answers, 1 is accepted

Sort by
0
Stefan Nenchev
Telerik team
answered on 13 Nov 2017, 12:06 PM
Hello, Ian,

Unfortunately, I was not able to reproduce this behavior as well. Can you please provide more information on your setup? Which version of the controls are you using? What modifications have you applied to the RadCalendar? Please try modifying the attached sample so we can have a look at the behavior and investigate it further.

Have a great week.

Regards,
Stefan Nenchev
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Ian
Top achievements
Rank 1
answered on 13 Nov 2017, 03:03 PM

I changed the code in your solution to the following...

var appointments = new List<Appointment>();
 
var colors = new[] {  Color.CornflowerBlue, Color.DarkTurquoise, Color.Tomato };
 
var random = new Random();
 
for (int i = 0; i < 200; i++)
{
     
    for (int j = 0; j < random.Next(1, 6); j++)
    {
        appointments.Add(new Appointment
        {
            Title = "Meeting with Tom",
            Detail = "Sea Garden",
            StartDate = date.AddDays(i).AddHours(j),
            EndDate = date.AddDays(i).AddHours(random.Next(j + 1, j + 12)),
            Color = colors[random.Next(0, 3)]
        });
    }
};
 
(this.calendar as RadCalendar).AppointmentsSource = appointments;

 

And yes, it does seem to work without the glitches - looks pretty funky. I will look into what my project is doing differently.

I did notice however, if you select a date in month view and switch to day view, the day view highlights the selected date correctly, but the colored blocks are from the previously selected date view date.

Not all colors show up. For example, Color.Azure doesn't seem to appear.

Also, month view is extremely slow on my cheap Android device with all those appointments.

 

0
Ian
Top achievements
Rank 1
answered on 13 Nov 2017, 03:29 PM
The iPhone doesn't seem to slow down at all in month mode when the appointment count is increased.
0
Ian
Top achievements
Rank 1
answered on 13 Nov 2017, 05:21 PM

I think I've tracked down the problem. My appointment set is a Task<IList<Appointment>>. If I do this...

var enumerable = appointments.Result.Select(a => new AppointmentAdapter
{
   StartDate = a.Start,
   EndDate = a.Finish,
   Title = a.SiteName,
   Color = Color.Chocolate,
   Detail = a.ClientName
 });
 
calendar.AppointmentsSource = enumerable;

 

... then the appointments randomly disappear as one navigates through the dates.

To fix this, I added ToList() to the end of enumerable's assignment.

 

 

0
Ian
Top achievements
Rank 1
answered on 13 Nov 2017, 05:41 PM
Do you have an idea why Android slows down with a lot of appointments whereas iPhone doesn't?
0
Stefan Nenchev
Telerik team
answered on 16 Nov 2017, 12:21 PM
Hello, Ian,

Glad to see you have resolved the original issue.

As for the performance in Android, have you applied some customizations to the cells of the calendar? We have identified that setting a style for the cell through the SetStyleForCell function has some performance issues in Android. We have the issue logged on the following link so you can follow it and vote for it - Calendar: [Android]Improve SetStyleForCell performance. In the meantime, we advise on using the different Style properties of the Calendar for customizations(DayCellStyle, SelectedDayStyle, etc.). Please confirm if this is the case at your end and test whether the behavior would be different with the suggested approach.

Regards,
Stefan Nenchev
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Ian
Top achievements
Rank 1
answered on 23 Nov 2017, 12:20 PM

I was running on Android using the project you uploaded with my modifications.

In month view, no appointments and it runs ok. Lots of appointments and it's very slow - even without any appointments during the current month.

I would like to load only the appointments for the visible months, but there doesn't seem to be a straight forward way of detecting when a new month appears.

0
Stefan Nenchev
Telerik team
answered on 28 Nov 2017, 10:41 AM
Hello, Ian,

I have managed to reproduce the behavior and, indeed, such performance hit is present when lots of appointments are used. I have logged the task at our end so you can track it here - Calendar: [Android]Poor Performance when lots of appointments are present. The issue seems related to the Calendar: [Android]Improve SetStyleForCell performance item so we will examine the overall performance of the control in Android and consider improving it. At this point, I cannot provide an exact time-frame when these issues will be checked, however, we have plans to introduce a Scheduler control in some of the upcoming releases and the performance of the Calendar will be a topic we need to consider at that point. I have added some points to your account for reporting the issue. 

Have a great rest of the week.

Regards,
Stefan Nenchev
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Asked by
Ian
Top achievements
Rank 1
Answers by
Stefan Nenchev
Telerik team
Ian
Top achievements
Rank 1
Share this question
or