Calendar SelectionMode Single not working

2 posts, 0 answers
  1. Kyle
    Kyle avatar
    30 posts
    Member since:
    Dec 2014

    Posted 19 May 2015 Link to this post


     I'm trying out a new POC for Android and using the Calendar widget.  It looks very promising, but I can't even get the SelectionMode single working.  Here is my code, from looking at the documentation it should be working.


               calendar:selectionMode="Single" />

    I've also tried setting it in the Activity:

    RadCalendarView calendar = FindViewById<RadCalendarView> (Resource.Id.calendarView);
                calendar.SelectionMode = CalendarSelectionMode.Single;

     As you can see from the image below, it is still selecting multiple dates...


    Here is what my calendar looks like:

  2. Antony Jekov
    Antony Jekov avatar
    88 posts

    Posted 21 May 2015 Link to this post

    Hello Kyle,

    Thank you for contacting the Android team.

    I confirmed that the xml attribute does not apply in the Xamarin Wrappers. I will log this as an issue and it will be fixed. Thank you for reporting this. We appreciate your feedback!

    Regarding setting the selection mode from code, you should do the following for Xamarin:
    <?xml version="1.0" encoding="utf-8"?>
    <FrameLayout xmlns:android=""
            android:layout_height="match_parent" />
    And setting the value:
    RadCalendarView calendar = FindViewById (Resource.Id.calendarView).JavaCast<RadCalendarView>();
    calendar.SelectionMode = CalendarSelectionMode.Single;

    This should work as expected. Let me know if you still have any troubles.

    Antony Jekov
    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