menu

UWP

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

    Show / Hide Table of Contents

    Class SfDatePicker

    Represents a control that allows the user to select a date by using a drop-down Syncfusion.UI.Xaml.Controls.Input.DateSelector control.

    Inheritance
    System.Object
    SfDatePicker
    Implements
    IDataValidator
    System.IDisposable
    Namespace: Syncfusion.UI.Xaml.Controls.Input
    Assembly: Syncfusion.SfInput.UWP.dll
    Syntax
    [ClassReference(IsReviewed = false)]
    public class SfDatePicker : Control, IDataValidator, IDisposable
    Remarks

    Constructors

    SfDatePicker()

    Initializes a new instance of the Syncfusion.UI.Xaml.Controls.Input.DatePicker class.

    Declaration
    [ClassReference(IsReviewed = false)]
    public SfDatePicker()
    See Also
    Syncfusion.UI.Xaml.Controls.Input.DateSelector
    Syncfusion.UI.Xaml.Controls.Input

    Fields

    AccentBrushProperty

    Using a DependencyProperty as the backing store for AccentBrush. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty AccentBrushProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    AllowInlineEditingProperty

    Using a DependencyProperty as the backing store for AllowInlineEditing. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty AllowInlineEditingProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    AllowNullProperty

    Using a DependencyProperty as the backing store for AllowNull. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty AllowNullProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    DateTimeProperty

    Using a DependencyProperty as the backing store for SelectedDateTime. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty DateTimeProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    DropDownHeightProperty

    Using a DependencyProperty as the backing store for SelectorStyle. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty DropDownHeightProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    FormatStringProperty

    Using a DependencyProperty as the backing store for FormatString. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty FormatStringProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    InputScopeProperty

    Using a DependencyProperty as the backing store for InputScope. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty InputScopeProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    IsDropDownOpenProperty

    Using a DependencyProperty as the backing store for IsDropDownOpen. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty IsDropDownOpenProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    MaxDateProperty

    Using a DependencyProperty as the backing store for MaxDate. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty MaxDateProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    MinDateProperty

    Using a DependencyProperty as the backing store for MinDate. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty MinDateProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    SelectorFormatStringProperty

    Using a DependencyProperty as the backing store for ValueFormat. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty SelectorFormatStringProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    SelectorItemCountProperty

    Using a DependencyProperty as the backing store for SelectorItemCount. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty SelectorItemCountProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    SelectorItemHeightProperty

    Using a DependencyProperty as the backing store for SelectorItemHeight. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty SelectorItemHeightProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    SelectorItemSpacingProperty

    Using a DependencyProperty as the backing store for SelectorItemSpacing. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty SelectorItemSpacingProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    SelectorItemWidthProperty

    Using a DependencyProperty as the backing store for SelectorItemWidth. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty SelectorItemWidthProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    SelectorStyleProperty

    Using a DependencyProperty as the backing store for SelectorStyle. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty SelectorStyleProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    SetValueOnLostFocusProperty

    Using a DependencyProperty as the backing store for SetValueInLostFocus. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty SetValueOnLostFocusProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    ShowDropDownButtonProperty

    Using a DependencyProperty as the backing store for ShowDropDownButton. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty ShowDropDownButtonProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    ValueProperty

    Using a DependencyProperty as the backing store for SelectedDateTime. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty ValueProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    WatermarkProperty

    Using a DependencyProperty as the backing store for Watermark. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty WatermarkProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    WatermarkTemplateProperty

    Using a DependencyProperty as the backing store for WatermarkTemplate. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty WatermarkTemplateProperty
    Field Value
    Type
    Windows.UI.Xaml.DependencyProperty

    Properties

    AccentBrush

    Gets or sets the background for Syncfusion.UI.Xaml.Controls.Input.DatePicker.

    Declaration
    [ClassReference(IsReviewed = false)]
    public Brush AccentBrush { get; set; }
    Property Value
    Type Description
    Windows.UI.Xaml.Media.Brush

    ba The default value is null.

    See Also
    Syncfusion.UI.Xaml.Controls.Input.DateSelector

    AllowInlineEditing

    Returns a value when set

    Declaration
    [ClassReference(IsReviewed = false)]
    public bool AllowInlineEditing { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if instance is created ; otherwise, false.

    AllowNull

    Gets or sets the AllowNull for the SfDatePicker control.

    Declaration
    [ClassReference(IsReviewed = false)]
    public bool AllowNull { get; set; }
    Property Value
    Type
    System.Boolean

    DateTime

    Gets or sets the DateTime value of the Syncfusion.UI.Xaml.Controls.Input.DatePicker control.

    Declaration
    [ClassReference(IsReviewed = false)]
    public Nullable<DateTime> DateTime { get; set; }
    Property Value
    Type Description
    System.Nullable<System.DateTime>

    The default value is null

    DropDownHeight

    Gets or sets the height of the drop down for the Syncfusion.UI.Xaml.Controls.Input.DatePicker.

    Declaration
    [ClassReference(IsReviewed = false)]
    public double DropDownHeight { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is is zero.

    See Also
    Syncfusion.UI.Xaml.Controls.Input.DatePicker.IsDropDownOpen
    Syncfusion.UI.Xaml.Controls.Input.DateSelector

    FormatString

    Gets or sets the data that is used as a format for Syncfusion.UI.Xaml.Controls.Input.DatePicker.

    Declaration
    [ClassReference(IsReviewed = false)]
    public string FormatString { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null.

    See Also
    Syncfusion.UI.Xaml.Controls.Input.DateSelector

    InputScope

    Gets or sets the input scope

    Declaration
    public InputScopeNameValue InputScope { get; set; }
    Property Value
    Type
    Windows.UI.Xaml.Input.InputScopeNameValue

    IsDropDownOpen

    Gets or sets a value indicating whether the popup Syncfusion.UI.Xaml.Controls.Input.DateSelector drop down is open.

    Declaration
    [ClassReference(IsReviewed = false)]
    public bool IsDropDownOpen { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if this instance is drop down open; otherwise, false.

    See Also
    Syncfusion.UI.Xaml.Controls.Input.DatePicker.DropDownHeight

    MaxDate

    Gets or sets the Maximum number of dates to be listed in the Syncfusion.UI.Xaml.Controls.Input.DatePicker control.

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

    The default value is DateTime.MaxValue

    MinDate

    Gets or sets the Minimum number of dates to be listed in the Syncfusion.UI.Xaml.Controls.Input.DatePicker control.

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

    The default value is DateTime.MinValue

    SelectorFormatString

    Gets or sets the SelectorFormatString for the Syncfusion.UI.Xaml.Controls.Input.DateSelector control.

    Declaration
    [ClassReference(IsReviewed = false)]
    public object SelectorFormatString { get; set; }
    Property Value
    Type
    System.Object

    SelectorItemCount

    Gets or sets the SelectorItemCount for the date selector items

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

    The default value is 0

    SelectorItemHeight

    Gets or sets the SelectorItemHeight for the date selector items

    Declaration
    public double SelectorItemHeight { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 80

    SelectorItemSpacing

    Gets or sets the SelectorItemSpacing for the date selector items

    Declaration
    public double SelectorItemSpacing { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 4

    SelectorItemWidth

    Gets or sets the SelectorItemWidth for the date selector items

    Declaration
    public double SelectorItemWidth { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is 80

    SelectorStyle

    Gets or sets the style that apply for the Syncfusion.UI.Xaml.Controls.Input.DateSelector.

    Declaration
    [ClassReference(IsReviewed = false)]
    public Style SelectorStyle { get; set; }
    Property Value
    Type Description
    Windows.UI.Xaml.Style

    The default value is null

    SetValueOnLostFocus

    Gets or sets a value indicating whether set Syncfusion.UI.Xaml.Controls.Input.DatePicker.Value on lost focus.

    Declaration
    [ClassReference(IsReviewed = false)]
    public bool SetValueOnLostFocus { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if set value on lost focus; otherwise, false.

    See Also
    Syncfusion.UI.Xaml.Controls.Input.DatePicker.Value
    Syncfusion.UI.Xaml.Controls.Input.DateSelector

    ShowDropDownButton

    Returns a value when set

    Declaration
    public bool ShowDropDownButton { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if instance is created ; otherwise, false.

    Value

    Gets or sets the value of the Syncfusion.UI.Xaml.Controls.Input.DatePicker that hold the currently selected date.

    Declaration
    [ClassReference(IsReviewed = false)]
    public object Value { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is System.DateTime.Now.

    See Also
    Syncfusion.UI.Xaml.Controls.Input.DatePicker.SetValueOnLostFocus
    Syncfusion.UI.Xaml.Controls.Input.DateSelector

    Watermark

    Gets or sets the data used as WateMark

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

    The default value is null

    WatermarkTemplate

    Gets or sets the template for the data used as WateMark

    Declaration
    public DataTemplate WatermarkTemplate { get; set; }
    Property Value
    Type Description
    Windows.UI.Xaml.DataTemplate

    The default value is null

    Methods

    Dispose()

    Unhooks all the events that are hooked

    Declaration
    public void Dispose()

    OnAllowInlineEditing(DependencyPropertyChangedEventArgs)

    Occurs when the instance of AllowInlineEditing is set true.

    Declaration
    protected virtual void OnAllowInlineEditing(DependencyPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    Windows.UI.Xaml.DependencyPropertyChangedEventArgs args

    OnApplyTemplate()

    Initializes all the child elements of Syncfusion.UI.Xaml.Controls.Input.DatePicker control.

    Declaration
    protected override void OnApplyTemplate()

    OnFormatStringChanged(DependencyPropertyChangedEventArgs)

    Occurs when the data used as FormatString has changed.

    Declaration
    protected virtual void OnFormatStringChanged(DependencyPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    Windows.UI.Xaml.DependencyPropertyChangedEventArgs args

    OnIsDropDownOpenChanged(DependencyPropertyChangedEventArgs)

    Occurs when the instance of IsDropDownOpen is set true.

    Declaration
    protected virtual void OnIsDropDownOpenChanged(DependencyPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    Windows.UI.Xaml.DependencyPropertyChangedEventArgs args

    OnKeyDown(KeyRoutedEventArgs)

    Occurs when the key is pressed

    Declaration
    protected override void OnKeyDown(KeyRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.KeyRoutedEventArgs e

    OnPointerReleased(PointerRoutedEventArgs)

    Occurs when the pointer is released

    Declaration
    protected override void OnPointerReleased(PointerRoutedEventArgs e)
    Parameters
    Type Name Description
    Windows.UI.Xaml.Input.PointerRoutedEventArgs e

    OnSelectorFormatStringChanged(DependencyPropertyChangedEventArgs)

    Occurs when the data used as SelectorFormatString has changed.

    Declaration
    protected virtual void OnSelectorFormatStringChanged(DependencyPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    Windows.UI.Xaml.DependencyPropertyChangedEventArgs args

    Validate(ValidationEventArgs)

    /// Validates the states Syncfusion.UI.Xaml.Controls.Input.VisualStates

    Declaration
    public void Validate(ValidationEventArgs args)
    Parameters
    Type Name Description
    ValidationEventArgs args

    Events

    ValueChanged

    Occurs when the value for Syncfusion.UI.Xaml.Controls.Input.DatePicker changed.

    Declaration
    [ClassReference(IsReviewed = false)]
    public event PropertyChangedCallback ValueChanged
    Event Type
    Type
    Windows.UI.Xaml.PropertyChangedCallback
    See Also
    Syncfusion.UI.Xaml.Controls.Input.DatePicker.Value

    Implements

    IDataValidator
    System.IDisposable

    Extension Methods

    DateTimeExtension.ToDateTime(Object)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved