Forum Xamarin.Forms



A working calendar control that is baked into .Core. It should have basic functionality like cell highlighting, selectionmodes for single and multiple at least. I would put it under Views.

API Changes

Not much. Just another control added into the existing ones. So you could easily integrate a calendar like this:

var calendar = new Calendar { SelectionMode = SelectionMode.Single, SelectedDate = DateTime.Today } calendar.SetBinding(Calendar.DaysToHighlight, new Binding("AppointmentDates"))

Use Case

Every app that has to deal with appointments I guess :)

As to start the discussion. IMO it is baffling that this isn't part of the framework already. So many apps use a calendar so it's not like this would be some edge use case or something. I actually put a ton of time into this already since it's critical for one of our apps and I wrote my own calendar which was.. let's say it was ok. I know you can buy one but why? That's not something extraordinary. Every shitty JS framework has this.

So if you say you could use the components for it, well yea on Android it's easy. I got that in an hour after I evaluated a load of plugins/components that are tackling this. But on iOS not anywhere near that experience. The TimesSquare component is just broken in Forms. I couldn't find a way to write a wrapper around for Forms that doesn't break the functionality. If someone got this please please please tell us how you got it working! And sadly the XLabs calendar is so unstable that it's near useless. And it doesn't even have core functionality like highlighting but it would be a good starting point since it has a lot of useful stuff.

This is what I have on Android with the TimesSquare Component, a CustomRenderer and some bits and pieces so I can access some functionality:


Open · Last Updated


  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Just playing devil's advocate...

    What's wrong with the DatePicker?
    A large part of the Xamarin eco-system is that your droid app feels like a droid app on droid, and feels like an iOS app on iOS. You get the native controls on each platform which makes all iOS apps feel like they are part of the same universe. Droid users feel at home in all apps because they all look/feel/work the same.
    Doesn't your proposal move against that core goal? Sure your calendar looks the same across all platforms, but its not the same date UI that every other calendar-based app on a given platform uses, making your program feel 'wrong' to the user.

  • RaphaelSchindlerRaphaelSchindler USMember ✭✭✭
    edited February 2017

    There's nothing wrong with the DatePicker. But that's not what I meant, sorry.
    I should clarify this. I actually want a calendar that has the native look of the OS. Not that it looks the same on every OS. If I wanted that I could use PhoneGap and write crappy JS apps that doesn't feel native at all.

    A DatePicker is not sufficent here. If you want to create a view where you have an overlook of your appointments it's standard to display a calendar with it. Just like in my screenshot.

  • seanydaseanyda GBMember ✭✭✭✭✭

    Sometimes its better to have something more visual and interactive rather then 2 date pickers to make a date range. Also its more simple and quicker using a Calendar to visualise data (like planned events) then a list.

  • AndyMartin.6838AndyMartin.6838 USMember ✭✭

    I needed a calendar for a project, but I ended up just using the native calendar (i.e. I would add and remove events by passing them to the native calendar). For my needs it worked perfectly.

  • StephaneDelcroixStephaneDelcroix USInsider, Beta ✭✭✭✭

    Are there native official calendar components for all the platforms supported by XF ?

  • RaphaelSchindlerRaphaelSchindler USMember ✭✭✭
    edited March 2017

    @StephaneDelcroix There are components for Android and iOS here for Android and here for iOS. But they're not for XF. You have to write a Custom Renderer for them.

    Here's a Plugin for XF but it's not using the native calendars sadly.

    EDIT: As I wrote in my first post, the custom renderer for Android is working fine but I couldn't get it to work for iOS. A custom renderer breaks the calendar and I couldn't figure out why.

  • StephaneDelcroixStephaneDelcroix USInsider, Beta ✭✭✭✭

    As there's no native component, I don't think it's wise to have a CalendarView distributed by XF.Core. It can, and should, be done as a 3rd party plugin/component.

  • RaphaelSchindlerRaphaelSchindler USMember ✭✭✭

    @StephaneDelcroix Could you clarify what you mean by "native"? In XLabs is a component that works on all platforms and uses the OS calendar.
    But it's missing functionality like highlighting a day if there's an appointment. And sadly it's not stable.

  • StephaneDelcroixStephaneDelcroix USInsider, Beta ✭✭✭✭

    is this:

    @RaphaelSchindler said:
    and uses the OS calendar.

    an answer to this:

    @StephaneDelcroix said:
    Are there native official calendar components for all the platforms supported by XF ?


  • RaphaelSchindlerRaphaelSchindler USMember ✭✭✭

    Sorry got that mixed up. I meant native

Sign In or Register to comment.