Class SfDateTimePicker
Initializes a new instance of the SfDateTimePicker class that represents a control, used to select the date with in specified date range.
Implements
Inherited Members
Namespace: Syncfusion.Maui.Picker
Assembly: Syncfusion.Maui.Picker.dll
Syntax
public class SfDateTimePicker : PickerBase, IDrawableLayout, IDrawable, IAbsoluteLayout, ILayout, IView, IElement, ITransform, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, ICrossPlatformLayout, IVisualTreeElement, ISemanticsProvider, IPicker, IPickerView, IColumnHeaderView, IFooterView, IHeaderView, IPickerCommon, IParentThemeElement, IThemeElement
Constructors
SfDateTimePicker()
Initializes a new instance of the SfDateTimePicker class.
Declaration
public SfDateTimePicker()
Fields
ColumnHeaderViewProperty
Identifies the ColumnHeaderView dependency property.
Declaration
public static readonly BindableProperty ColumnHeaderViewProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for ColumnHeaderView dependency property. |
DateFormatProperty
Identifies the DateFormat dependency property.
Declaration
public static readonly BindableProperty DateFormatProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for DateFormat dependency property. |
DayIntervalProperty
Identifies the DayInterval dependency property.
Declaration
public static readonly BindableProperty DayIntervalProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for DayInterval dependency property. |
HeaderViewProperty
Identifies the HeaderView dependency property.
Declaration
public static readonly BindableProperty HeaderViewProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for HeaderView dependency property. |
HourIntervalProperty
Identifies the HourInterval dependency property.
Declaration
public static readonly BindableProperty HourIntervalProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for HourInterval dependency property. |
MaximumDateProperty
Identifies the MaximumDate dependency property.
Declaration
public static readonly BindableProperty MaximumDateProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for MaximumDate dependency property. |
MinimumDateProperty
Identifies the MinimumDate dependency property.
Declaration
public static readonly BindableProperty MinimumDateProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for MinimumDate dependency property. |
MinuteIntervalProperty
Identifies the MinuteInterval dependency property.
Declaration
public static readonly BindableProperty MinuteIntervalProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for MinuteInterval dependency property. |
MonthIntervalProperty
Identifies the MonthInterval dependency property.
Declaration
public static readonly BindableProperty MonthIntervalProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for MonthInterval dependency property. |
SecondIntervalProperty
Identifies the SecondInterval dependency property.
Declaration
public static readonly BindableProperty SecondIntervalProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for SecondInterval dependency property. |
SelectedDateProperty
Identifies the SelectedDate dependency property.
Declaration
public static readonly BindableProperty SelectedDateProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for SelectedDate dependency property. |
SelectionChangedCommandProperty
Identifies the SelectionChangedCommand dependency property.
Declaration
public static readonly BindableProperty SelectionChangedCommandProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for SelectionChangedCommand dependency property. |
TimeFormatProperty
Identifies the TimeFormat dependency property.
Declaration
public static readonly BindableProperty TimeFormatProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for TimeFormat dependency property. |
YearIntervalProperty
Identifies the YearInterval dependency property.
Declaration
public static readonly BindableProperty YearIntervalProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for YearInterval dependency property. |
Properties
ColumnHeaderView
Gets or sets the value of column header view. This property can be used to customize the header column in SfDateTimePicker.
Declaration
public DateTimePickerColumnHeaderView ColumnHeaderView { get; set; }
Property Value
Type |
---|
DateTimePickerColumnHeaderView |
DateFormat
Gets or sets the picker date format in SfDateTimePicker.
Declaration
public PickerDateFormat DateFormat { get; set; }
Property Value
Type |
---|
PickerDateFormat |
DayInterval
Gets or sets the day interval in SfDateTimePicker.
Declaration
public int DayInterval { get; set; }
Property Value
Type |
---|
System.Int32 |
HeaderView
Gets or sets the value of header view. This property can be used to customize the header in SfDateTimePicker.
Declaration
public DateTimePickerHeaderView HeaderView { get; set; }
Property Value
Type |
---|
DateTimePickerHeaderView |
HourInterval
Gets or sets the hour interval in SfDateTimePicker.
Declaration
public int HourInterval { get; set; }
Property Value
Type |
---|
System.Int32 |
MaximumDate
Gets or sets the maximum date in SfDateTimePicker.
Declaration
public DateTime MaximumDate { get; set; }
Property Value
Type |
---|
System.DateTime |
MinimumDate
Gets or sets the minimum date in SfDateTimePicker.
Declaration
public DateTime MinimumDate { get; set; }
Property Value
Type |
---|
System.DateTime |
MinuteInterval
Gets or sets the minute interval in SfDateTimePicker.
Declaration
public int MinuteInterval { get; set; }
Property Value
Type |
---|
System.Int32 |
MonthInterval
Gets or sets the month interval in SfDateTimePicker.
Declaration
public int MonthInterval { get; set; }
Property Value
Type |
---|
System.Int32 |
SecondInterval
Gets or sets the second interval in SfDateTimePicker.
Declaration
public int SecondInterval { get; set; }
Property Value
Type |
---|
System.Int32 |
SelectedDate
Gets or sets the date picker selected date in SfDateTimePicker.
Declaration
public Nullable<DateTime> SelectedDate { get; set; }
Property Value
Type |
---|
System.Nullable<System.DateTime> |
SelectionChangedCommand
Gets or sets the selection changed command in SfDateTimePicker.
Declaration
public ICommand SelectionChangedCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
TimeFormat
Gets or sets the picker time format in SfDateTimePicker.
Declaration
public PickerTimeFormat TimeFormat { get; set; }
Property Value
Type |
---|
PickerTimeFormat |
YearInterval
Gets or sets the year interval in SfDateTimePicker.
Declaration
public int YearInterval { get; set; }
Property Value
Type |
---|
System.Int32 |
Methods
Initialize()
Method to wire the events.
Declaration
protected override void Initialize()
Overrides
OnBindingContextChanged()
Method triggers when the property binding context changed.
Declaration
protected override void OnBindingContextChanged()
Overrides
OnCancelButtonClicked(EventArgs)
Method triggers when the date time picker cancel button clicked.
Declaration
protected override void OnCancelButtonClicked(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | The event arguments. |
Overrides
OnHeaderButtonClicked(Int32)
Method triggers while the header button clicked.
Declaration
protected override void OnHeaderButtonClicked(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Index of the header button. |
Overrides
OnOkButtonClicked(EventArgs)
Method triggers when the date time picker ok button clicked.
Declaration
protected override void OnOkButtonClicked(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | The event arguments. |
Overrides
OnPickerLoading()
Method triggers while the popup opening or switched from popup to default.
Declaration
protected override void OnPickerLoading()
Overrides
OnPopupClosed(EventArgs)
Method triggers when the date time picker popup closed.
Declaration
protected override void OnPopupClosed(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | The event arguments. |
Overrides
OnPopupClosing(CancelEventArgs)
Method triggers when the date time picker popup closing.
Declaration
protected override void OnPopupClosing(CancelEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.CancelEventArgs | e | The event arguments. |
Overrides
OnPopupOpened(EventArgs)
Method triggers when the date time picker popup opened.
Declaration
protected override void OnPopupOpened(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | The event arguments. |
Overrides
Events
SelectionChanged
Occurs after the selected date is changed on SfDateTimePicker.
Declaration
public event EventHandler<DateTimePickerSelectionChangedEventArgs> SelectionChanged
Event Type
Type |
---|
System.EventHandler<DateTimePickerSelectionChangedEventArgs> |