xamarin-forms-docs/knowledge-base/calendar-picker.md

1.3 KiB

title description type page_title slug position tags ticketid res_type
Calendar picker how to create a calendar picker control how-to calendar picker that displays the calendar control calendar-picker 1529808 kb

Environment

Product Version
Product Progress® Telerik® UI for Xamarin

Description

This article shows how to create a Calendar picker control which allows you to pick a date froma calendar.

Solution

In order to create a calendar picker control you have to use the Telerik UI for Xamarin [Templated Picker]({%slug templated-picker-overview%}) control.

Example

Add the templatedPicker to the page and inside the RadTemplatedPicker.SelectorTemplate add the RadCalendar control:

<telerikInput:RadTemplatedPicker>
    <telerikInput:RadTemplatedPicker.SelectorTemplate>
        <ControlTemplate>
            <telerikInput:RadCalendar SelectedDate="{TemplateBinding SelectedValue, Mode=TwoWay}"/>
        </ControlTemplate>
    </telerikInput:RadTemplatedPicker.SelectorTemplate>
</telerikInput:RadTemplatedPicker>

Add the namespaces:

xmlns:telerikInput="clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input"