TKCalendar Disable Cell for dates

2 posts, 0 answers
  1. avinash
    avinash avatar
    6 posts
    Member since:
    Dec 2018

    Posted 12 Feb 2019 Link to this post

    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?






  2. Yana
    Yana avatar
    4993 posts

    Posted 13 Feb 2019 Link to this post

    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.

    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
Back to Top