menu

Xamarin.Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfDatePicker - Xamarin.Forms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfDatePicker

    SfDatePicker is a picker control with collections of date. You can customize it by setting start date, end date, date format etc.

    Inheritance
    System.Object
    PickerBase
    SfDatePicker
    Implements
    System.IDisposable
    Inherited Members
    PickerBase.BackgroundColor
    PickerBase.BackgroundColorProperty
    PickerBase.BorderColor
    PickerBase.BorderColorProperty
    PickerBase.CancelButtonBackgroundColor
    PickerBase.CancelButtonBackgroundColorProperty
    PickerBase.CancelButtonTextColor
    PickerBase.CancelButtonTextColorProperty
    PickerBase.ColumnHeaderBackgroundColor
    PickerBase.ColumnHeaderBackgroundColorProperty
    PickerBase.ColumnHeaderFontAttribute
    PickerBase.ColumnHeaderFontAttributeProperty
    PickerBase.ColumnHeaderFontFamily
    PickerBase.ColumnHeaderFontFamilyProperty
    PickerBase.ColumnHeaderFontSize
    PickerBase.ColumnHeaderFontSizeProperty
    PickerBase.ColumnHeaderHeight
    PickerBase.ColumnHeaderHeightProperty
    PickerBase.ColumnHeaderTextColor
    PickerBase.ColumnHeaderTextColorProperty
    PickerBase.EnableLooping
    PickerBase.EnableLoopingProperty
    PickerBase.FooterHeight
    PickerBase.FooterHeightProperty
    PickerBase.FooterView
    PickerBase.FooterViewProperty
    PickerBase.HeaderBackgroundColor
    PickerBase.HeaderBackgroundColorProperty
    PickerBase.HeaderFontAttribute
    PickerBase.HeaderFontAttributeProperty
    PickerBase.HeaderFontFamily
    PickerBase.HeaderFontFamilyProperty
    PickerBase.HeaderFontSize
    PickerBase.HeaderFontSizeProperty
    PickerBase.HeaderHeight
    PickerBase.HeaderHeightProperty
    PickerBase.HeaderTextColor
    PickerBase.HeaderTextColorProperty
    PickerBase.HeaderView
    PickerBase.HeaderViewProperty
    PickerBase.IsOpen
    PickerBase.IsOpenProperty
    PickerBase.ItemHeight
    PickerBase.ItemHeightProperty
    PickerBase.OKButtonBackgroundColor
    PickerBase.OKButtonBackgroundColorProperty
    PickerBase.OKButtonTextColor
    PickerBase.OKButtonTextColorProperty
    PickerBase.Parent
    PickerBase.PickerHeight
    PickerBase.PickerHeightProperty
    PickerBase.PickerMode
    PickerBase.PickerModeProperty
    PickerBase.PickerWidth
    PickerBase.PickerWidthProperty
    PickerBase.SelectedItemFontAttribute
    PickerBase.SelectedItemFontAttributeProperty
    PickerBase.SelectedItemFontFamily
    PickerBase.SelectedItemFontFamilyProperty
    PickerBase.SelectedItemFontSize
    PickerBase.SelectedItemFontSizeProperty
    PickerBase.SelectedItemTextColor
    PickerBase.SelectedItemTextColorProperty
    PickerBase.SelectionBackgroundColor
    PickerBase.SelectionBackgroundColorProperty
    PickerBase.ShowColumnHeader
    PickerBase.ShowColumnHeaderProperty
    PickerBase.ShowFooter
    PickerBase.ShowFooterProperty
    PickerBase.ShowHeader
    PickerBase.ShowHeaderProperty
    PickerBase.UnselectedItemFontAttribute
    PickerBase.UnselectedItemFontAttributeProperty
    PickerBase.UnselectedItemFontFamily
    PickerBase.UnselectedItemFontFamilyProperty
    PickerBase.UnselectedItemFontSize
    PickerBase.UnselectedItemFontSizeProperty
    PickerBase.UnselectedItemTextColor
    PickerBase.UnselectedItemTextColorProperty
    Namespace: Syncfusion.XForms.Pickers
    Assembly: Syncfusion.SfPicker.XForms.dll
    Syntax
    public class SfDatePicker : PickerBase, IDisposable

    Constructors

    SfDatePicker()

    Initializes a new instance of the SfDatePicker class.

    Declaration
    public SfDatePicker()

    Fields

    CancelCommandProperty

    Identifies the CancelCommand dependency property. This property can be used to change the cancel command of the SfDatePicker control.

    Declaration
    public static readonly BindableProperty CancelCommandProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty
    Remarks

    This bindable property is read-only.

    CommandParameterProperty

    Identifies the CommandParameter dependency property. This property can be used to change the command parameter of the SfDatePicker control.

    Declaration
    public static readonly BindableProperty CommandParameterProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty
    Remarks

    This bindable property is read-only.

    DateProperty

    Identifies the Date dependency property. This property can be used to change the date of the SfDatePicker control.

    Declaration
    public static readonly BindableProperty DateProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    DayHeaderTextProperty

    Identifies the DayHeaderText dependency property. This property can be used to change the day header text of the SfDatePicker control.

    Declaration
    public static readonly BindableProperty DayHeaderTextProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    DayIntervalProperty

    Identifies the DayInterval dependency property. This property can be used to change the day interval of the SfDatePicker control.

    Declaration
    public static readonly BindableProperty DayIntervalProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    FormatProperty

    Identifies the Format dependency property. This property can be used to change the format of the SfDatePicker control.

    Declaration
    public static readonly BindableProperty FormatProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    HeaderTextProperty

    Identifies the HeaderText dependency property. This property can be used to change the header text of the SfDatePicker control.

    Declaration
    public static readonly BindableProperty HeaderTextProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    MaximumDateProperty

    Identifies the MaximumDate dependency property. This property can be used to change the maximum date of the SfDatePicker control.

    Declaration
    public static readonly BindableProperty MaximumDateProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    MinimumDateProperty

    Identifies the MinimumDate dependency property. This property can be used to change the minimum date of the SfDatePicker control.

    Declaration
    public static readonly BindableProperty MinimumDateProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    MonthHeaderTextProperty

    Identifies the MonthHeaderText dependency property. This property can be used to change the month header text of the SfDatePicker control.

    Declaration
    public static readonly BindableProperty MonthHeaderTextProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    MonthIntervalProperty

    Identifies the MonthInterval dependency property. This property can be used to change the month interval of the SfDatePicker control.

    Declaration
    public static readonly BindableProperty MonthIntervalProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    OkCommandProperty

    Identifies the OkCommand dependency property. This property can be used to change the ok command of the SfDatePicker control.

    Declaration
    public static readonly BindableProperty OkCommandProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty
    Remarks

    This bindable property is read-only.

    YearHeaderTextProperty

    Identifies the YearHeaderText dependency property. This property can be used to change the year header text of the SfDatePicker control.

    Declaration
    public static readonly BindableProperty YearHeaderTextProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    YearIntervalProperty

    Identifies the YearInterval dependency property. This property can be used to change the year interval of the SfDatePicker control.

    Declaration
    public static readonly BindableProperty YearIntervalProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    Properties

    CancelCommand

    Gets or sets the value of the Command. It invokes when the button is activated. It is a bindale property.

    Declaration
    public ICommand CancelCommand { get; set; }
    Property Value
    Type Description
    System.Windows.Input.ICommand

    The command.

    CommandParameter

    Gets or sets the value of the CommandParameter, which is a parameter to pass the Command property. This is a bindable property.

    Declaration
    public object CommandParameter { get; set; }
    Property Value
    Type Description
    System.Object

    The command parameter.

    Date

    Gets or sets the date that defines the current selected date. This is a bindable property.

    Declaration
    public DateTime Date { get; set; }
    Property Value
    Type
    System.DateTime

    DayHeaderText

    Gets or sets day text. This is a bindable property.

    Declaration
    public string DayHeaderText { get; set; }
    Property Value
    Type
    System.String

    DayInterval

    Gets or sets day interval This is a bindable property.

    Declaration
    public int DayInterval { get; set; }
    Property Value
    Type
    System.Int32

    Format

    Gets or sets the date format. This is a bindable property.

    Declaration
    public DateFormat Format { get; set; }
    Property Value
    Type
    DateFormat

    HeaderText

    Gets or sets header text. This is a bindable property.

    Declaration
    public string HeaderText { get; set; }
    Property Value
    Type
    System.String

    MaximumDate

    Gets or sets the date that defines the maximum date. This is a bindable property.

    Declaration
    public DateTime MaximumDate { get; set; }
    Property Value
    Type
    System.DateTime

    MinimumDate

    Gets or sets the date that defines the minimum date. This is a bindable property.

    Declaration
    public DateTime MinimumDate { get; set; }
    Property Value
    Type
    System.DateTime

    MonthHeaderText

    Gets or sets the month text. This is a bindable property.

    Declaration
    public string MonthHeaderText { get; set; }
    Property Value
    Type
    System.String

    MonthInterval

    Gets or sets month interval. This is a bindable property.

    Declaration
    public int MonthInterval { get; set; }
    Property Value
    Type
    System.Int32

    OkCommand

    Gets or sets the value of the Command. It invokes when the button is activated. It is a bindale property.

    Declaration
    public ICommand OkCommand { get; set; }
    Property Value
    Type Description
    System.Windows.Input.ICommand

    The command.

    YearHeaderText

    Gets or sets year text. This is a bindable property.

    Declaration
    public string YearHeaderText { get; set; }
    Property Value
    Type
    System.String

    YearInterval

    Gets or sets year interval. This is a bindable property.

    Declaration
    public int YearInterval { get; set; }
    Property Value
    Type
    System.Int32

    Methods

    Dispose()

    Dispose method.

    Declaration
    public void Dispose()

    Events

    CancelButtonClicked

    Occurs when the default Cancel button clicked.

    Declaration
    public event EventHandler<DateChangedEventArgs> CancelButtonClicked
    Event Type
    Type
    System.EventHandler<DateChangedEventArgs>

    Closed

    The ClosedEvent occurs when close the SfDatePicker control.

    Declaration
    public event EventHandler<EventArgs> Closed
    Event Type
    Type
    System.EventHandler<System.EventArgs>

    Closing

    The ClosingEvent occurs when close the SfDatePicker control

    Declaration
    public event EventHandler<CancelEventArgs> Closing
    Event Type
    Type
    System.EventHandler<CancelEventArgs>

    DateSelected

    It represents the date changed event.

    Declaration
    public event EventHandler<DateChangedEventArgs> DateSelected
    Event Type
    Type
    System.EventHandler<DateChangedEventArgs>

    OkButtonClicked

    Occurs when the default OK button clicked.

    Declaration
    public event EventHandler<DateChangedEventArgs> OkButtonClicked
    Event Type
    Type
    System.EventHandler<DateChangedEventArgs>

    Opened

    The OpendedEvent occurs when open the SfDatePicker control.

    Declaration
    public event EventHandler<EventArgs> Opened
    Event Type
    Type
    System.EventHandler<System.EventArgs>

    Implements

    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved