Class SfDatePicker
SfDatePicker is a picker control with collections of date. You can customize it by setting start date, end date, date format etc.
Implements
Inherited Members
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> |