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

TKCalendar Disable Cell for dates

1 Answer 18 Views
Calendar - Xamarin.iOS
This is a migrated thread and some comments may be shown as answers.
avinash
Top achievements
Rank 1
avinash asked on 12 Feb 2019, 11:01 AM

Hi Team,

I am using TKCalendar for my iOS App and am using custom data cell as instructed in documents.

I need to disable user action on particular dates .

how could it be achieved?

 

Thanks,

Avinash

 

 

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 13 Feb 2019, 11:55 AM
Hi Avinash,

You can prevent TKCalendar from selecting specific date by overriding ShouldSelectDate method of the CalendarDelegate that you're using:


class CalendarDelegate : TKCalendarDelegate
{
    ...
    public override bool ShouldSelectDate(TKCalendar calendar, NSDate date)
    {
        //return base.ShouldSelectDate(calendar, date);
        return !TKCalendar.IsDate(main.UnselectableDate, date, NSCalendarUnit.Year | NSCalendarUnit.Month | NSCalendarUnit.Day, main.CalendarView.Calendar);
    }
}

For more details on this, please go to the Calendar Selection topic.

Regards,
Yana
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 - Xamarin.iOS
Asked by
avinash
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or