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

All day overflow

3 Answers 60 Views
Calendar & Scheduling
This is a migrated thread and some comments may be shown as answers.
Craig Neblett
Top achievements
Rank 1
Craig Neblett asked on 18 Jan 2018, 12:38 AM

It appears that the all-day section of the day view is limited to four appointments formatted in a two column grid. Is there any way to alter this? I realize that there needs to be a practical limit on , but I'd like it to be more than four. I'd also like the appointments to take up the full width, a single column rather than two.

Absent any of that, I'd like to be able to indicate that there are more all-day appointments could be displayed.

It all probably comes down to guidance on how to alter or replace the AllDayEventsView in a custom renderer.

Thanks,

Craig

3 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 22 Jan 2018, 03:48 PM
Hello Craig,

We already have a feature request about exposing more customisation properties for the all-day sections - you can track its progress on the following link from our Ideas & Feedback portal - link. Please subscribe to the item in order to be automatically notified when an update is available.

Currently you can achieve some of the described functionalities by creating a custom CalendarRenderer where you will have access to the native android & iOS controls. I'm posting simple implementation of CustomCalendarRenderer that shows the all-day appointments in one column instead of two:

Android implementation:

public class CustomCalendarRenderer : CalendarRenderer
{
    public override bool TrySetViewMode(CalendarViewMode view, bool isAnimated)
    {
        if (view == CalendarViewMode.Day)
        {
            this.Control.DayView.AllDayEventsViewStyle.MaxColumns = 1;
        }
 
        return base.TrySetViewMode(view, isAnimated);
    }
}


iOS implementation:

public class CustomCalendarRenderer : CalendarRenderer
{
    protected override CalendarDelegate CreateCalendarDelegateOverride()
    {
        return new CustomCalendarDelegate();
    }
}
 
public class CustomCalendarDelegate : CalendarDelegate
{
    public override void DidChangedViewModeFrom(TKCalendar calendar, TKCalendarViewMode previousViewMode, TKCalendarViewMode viewMode)
    {
        base.DidChangedViewModeFrom(calendar, previousViewMode, viewMode);
 
        var dayViewPresenter = calendar.Presenter as TKCalendarDayViewPresenter;
        if (dayViewPresenter == null)
        {
            return;
        }
 
        dayViewPresenter.DayView.AllDayEventsView.Style.EventsPerRow = 1;
    }
}



Additionally you can show more than two rows for the all-day appointments for android using the MaxVisibleEventRows property of the AllDayEventsViewStyle class. Unfortunately this functionality is still missing for the iOS DayView. 


Here are a few links about how to create a custom renderer:


Have a great week.

Regards,
Nikolay
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
Craig Neblett
Top achievements
Rank 1
answered on 22 Jan 2018, 06:35 PM

On iOS, the TKCalendarDayViewAllDayEventsViewStyle class has a MaxVisibleLines property which appears to be initially set to 2. It looks like I can increase that to 3 to get a third line to display. Values greater than 3, however, appear to have no effect. Is this the limit of the control or can the height of that view be adjusted to allow for more rows?

Thanks,

Craig

0
Nikolay
Telerik team
answered on 23 Jan 2018, 08:32 AM
Hello Craig,

Yes, the MaxVisibleLines property of the TKCalendarDayViewAllDayEventsViewStyle is intended to adjust the visible rows of the all-day appointments. I can confirm that this is an is an issue with the iOS implementation of the DayView. I have logged Bug Report in our backlog about this behavior. Here is a link to the public item in our Feedback Portal.

Regarding your question about increasing the height of the AllDay view - currently a property for controlling the height of the view is not exposed. The only work around I can suggest you is to increase the bottom value of the EventsViewInsets property. Here is a simple code snipped of how to set the property:

dayViewPresenter.DayView.AllDayEventsView.Style.EventsViewInsets = new UIKit.UIEdgeInsets(3, 3, 50, 3);


I hope I've been helpful.

Regards,
Nikolay
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
Tags
Calendar & Scheduling
Asked by
Craig Neblett
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Craig Neblett
Top achievements
Rank 1
Share this question
or