Date​Picker​Flyout Date​Picker​Flyout Date​Picker​Flyout Class

Definition

Represents a control that allows a user to pick a date.

public : sealed class DatePickerFlyout : PickerFlyoutBase, IDatePickerFlyout, IDatePickerFlyout2public sealed class DatePickerFlyout : PickerFlyoutBase, IDatePickerFlyout, IDatePickerFlyout2Public NotInheritable Class DatePickerFlyout Inherits PickerFlyoutBase Implements IDatePickerFlyout, IDatePickerFlyout2
Inheritance
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Inherited Members

Inherited properties

Inherited methods

Inherited events

Constructors

DatePickerFlyout() DatePickerFlyout() DatePickerFlyout()

Initializes a new instance of the DatePickerFlyout class.

public : DatePickerFlyout()public DatePickerFlyout()Public Sub New()
Attributes

Properties

CalendarIdentifier CalendarIdentifier CalendarIdentifier

Gets or sets the calendar system to use.

public : PlatForm::String CalendarIdentifier { get; set; }public string CalendarIdentifier { get; set; }Public ReadWrite Property CalendarIdentifier As string
Value
PlatForm::String string string

The name of the calendar system to use. For a list of supported calendar systems, see CalendarIdentifiers.

Attributes

CalendarIdentifierProperty CalendarIdentifierProperty CalendarIdentifierProperty

Gets the identifier for the CalendarIdentifier dependency property.

public : static DependencyProperty CalendarIdentifierProperty { get; }public static DependencyProperty CalendarIdentifierProperty { get; }Public Static ReadOnly Property CalendarIdentifierProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the CalendarIdentifier dependency property.

Attributes

Date Date Date

Gets or sets the date currently set in the date picker.

public : DateTime Date { get; set; }public DateTimeOffset Date { get; set; }Public ReadWrite Property Date As DateTimeOffset
Value
DateTime DateTimeOffset DateTimeOffset

The date currently set in the picker.

Attributes

DateProperty DateProperty DateProperty

Gets the identifier for the Date dependency property.

public : static DependencyProperty DateProperty { get; }public static DependencyProperty DateProperty { get; }Public Static ReadOnly Property DateProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the Date dependency property.

Attributes

DayFormat DayFormat DayFormat

Gets or sets the display format for the day value.

public : PlatForm::String DayFormat { get; set; }public string DayFormat { get; set; }Public ReadWrite Property DayFormat As string
<DatePickerFlyout DayFormat="formatString"/>
Value
PlatForm::String string string

The display format for the day value.

Attributes

Remarks

Change the format of the day value by setting the DayFormat property.

The string content of the day value is created by a DateTimeFormatter. You inform the DateTimeFormatter how to format the day value by providing a string that is either a format template or a format pattern. Common templates and patterns for day values are listed in the following table.

format patternformat template
{day.integer} | {day.integer(n)}day
{dayofweek.full} | {dayofweek.abbreviated} | {dayofweek.abbreviated(n)}dayofweek | dayofweek.full | dayofweek.abbreviated

In some cases, using a format pattern gives you more precise control over the formatting. For example, you can use a format pattern to specify that the day picker always shows 2 digits, including a leading 0 when needed. You can also combine multiple format patterns. For example, you can combine the {day} and {dayofweek.abbreviated} formats to make the day picker show both the numeric date and the day of the week, like this: 14 Thu. See the Examples section for more info.

For the complete list of format templates and format patterns, see the Remarks section of the DateTimeFormatter class documentation.

Note

Some date formats should be avoided if the date picker might be displayed in a small area, such as adding the full string value of the day of week. These strings can be long and might be clipped if the DatePicker's width is forced to be small.

See Also

DayFormatProperty DayFormatProperty DayFormatProperty

Identifies the DayFormat dependency property.

public : static DependencyProperty DayFormatProperty { get; }public static DependencyProperty DayFormatProperty { get; }Public Static ReadOnly Property DayFormatProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the DayFormat dependency property.

Attributes
See Also

DayVisible DayVisible DayVisible

Gets or sets a value that indicates whether the day selector is shown.

public : PlatForm::Boolean DayVisible { get; set; }public bool DayVisible { get; set; }Public ReadWrite Property DayVisible As bool
Value
PlatForm::Boolean bool bool

True if the day selector is shown; otherwise, false. The default is true.

Attributes

DayVisibleProperty DayVisibleProperty DayVisibleProperty

Gets the identifier for the DayVisible dependency property.

public : static DependencyProperty DayVisibleProperty { get; }public static DependencyProperty DayVisibleProperty { get; }Public Static ReadOnly Property DayVisibleProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the DayVisible dependency property.

Attributes

MaxYear MaxYear MaxYear

Gets or sets the maximum Gregorian year available for picking.

public : DateTime MaxYear { get; set; }public DateTimeOffset MaxYear { get; set; }Public ReadWrite Property MaxYear As DateTimeOffset
Value
DateTime DateTimeOffset DateTimeOffset

The maximum Gregorian year available for picking.S

Attributes

MaxYearProperty MaxYearProperty MaxYearProperty

Gets the identifier for the MaxYear dependency property.

public : static DependencyProperty MaxYearProperty { get; }public static DependencyProperty MaxYearProperty { get; }Public Static ReadOnly Property MaxYearProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the MaxYear dependency property.

Attributes

MinYear MinYear MinYear

Gets or sets the minimum Gregorian year available for picking.

public : DateTime MinYear { get; set; }public DateTimeOffset MinYear { get; set; }Public ReadWrite Property MinYear As DateTimeOffset
Value
DateTime DateTimeOffset DateTimeOffset

The minimum Gregorian year available for picking.

Attributes

MinYearProperty MinYearProperty MinYearProperty

Gets the identifier for the MinYear dependency property.

public : static DependencyProperty MinYearProperty { get; }public static DependencyProperty MinYearProperty { get; }Public Static ReadOnly Property MinYearProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the MinYear dependency property.

Attributes

MonthFormat MonthFormat MonthFormat

Gets or sets the display format for the month value.

public : PlatForm::String MonthFormat { get; set; }public string MonthFormat { get; set; }Public ReadWrite Property MonthFormat As string
<DatePickerFlyout MonthFormat="formatString"/>
Value
PlatForm::String string string

The display format for the month value.

Attributes

Remarks

Change the format of the month value by setting the MonthFormat property.

The string content of the month value is created by a DateTimeFormatter. You inform the DateTimeFormatter how to format the day value by providing a string that is either a format template or a format pattern. Common templates and patterns for day values are listed in the following table.

format patternformat template
{month.integer} | {month.integer(n)}month.numeric
{month.full} | {month.abbreviated} | {month.abbreviated(n)}month | month.full | month.abbreviated

In some cases, using a format pattern gives you more precise control over the formatting. For example, you can use a format pattern to specify that the month picker always shows 2 digits, including a leading 0 when needed. You can also combine multiple format patterns. For example, you can combine the {month.integer} and {month.abbreviated} formats to make the month picker show the month number and name, like this: 12 Dec. See the Examples section for more info.

For the complete list of format templates and format patterns, see the Remarks section of the DateTimeFormatter class documentation.

Note

Some date formats should be avoided if the date picker might be displayed in a small area, such as adding the full string value of the day of week. These strings can be long and might be clipped if the DatePicker's width is forced to be small.

See Also

MonthFormatProperty MonthFormatProperty MonthFormatProperty

Identifies the MonthFormat dependency property.

public : static DependencyProperty MonthFormatProperty { get; }public static DependencyProperty MonthFormatProperty { get; }Public Static ReadOnly Property MonthFormatProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the MonthFormat dependency property.

Attributes
See Also

MonthVisible MonthVisible MonthVisible

Gets or sets a value that indicates whether the month selector is shown.

public : PlatForm::Boolean MonthVisible { get; set; }public bool MonthVisible { get; set; }Public ReadWrite Property MonthVisible As bool
Value
PlatForm::Boolean bool bool

True if the month selector is shown; otherwise, false. The default is true.

Attributes

MonthVisibleProperty MonthVisibleProperty MonthVisibleProperty

Gets the identifier for the MonthVisible dependency property.

public : static DependencyProperty MonthVisibleProperty { get; }public static DependencyProperty MonthVisibleProperty { get; }Public Static ReadOnly Property MonthVisibleProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the MonthVisible dependency property.

Attributes

YearFormat YearFormat YearFormat

Gets or sets the display format for the year value.

public : PlatForm::String YearFormat { get; set; }public string YearFormat { get; set; }Public ReadWrite Property YearFormat As string
<DatePickerFlyout YearFormat="formatString"/>
Value
PlatForm::String string string

The display format for the year value.

Attributes

Remarks

Change the format of the year value by setting the YearFormat property.

The string content of the year value is created by a DateTimeFormatter. You inform the DateTimeFormatter how to format the year value by providing a string that is either a format template or a format pattern. Common templates and patterns for year values are listed in the following table.

format patternformat template
{year.full} | {year.abbreviated} | {year.abbreviated(n)}year | year.full | year.abbreviated
{era.full} | {era.abbreviated} | {era.abbreviated(n)}n/a
Note

"Era" only applies when the CalendarIdentifier is set to the Japanese calendar. For the Japanese calendar, era is shown in the year picker.

For the complete list of format templates and format patterns, see the Remarks section of the DateTimeFormatter class documentation.

Note

Some date formats should be avoided if the date picker might be displayed in a small area, such as adding the full string value of the day of week. These strings can be long and might be clipped if the DatePicker's width is forced to be small.

See Also

YearFormatProperty YearFormatProperty YearFormatProperty

Identifies the YearFormat dependency property.

public : static DependencyProperty YearFormatProperty { get; }public static DependencyProperty YearFormatProperty { get; }Public Static ReadOnly Property YearFormatProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the YearFormat dependency property.

Attributes
See Also

YearVisible YearVisible YearVisible

Gets or sets a value that indicates whether the year selector is shown.

public : PlatForm::Boolean YearVisible { get; set; }public bool YearVisible { get; set; }Public ReadWrite Property YearVisible As bool
Value
PlatForm::Boolean bool bool

True if the year selector is shown; otherwise, false. The default is true.

Attributes

YearVisibleProperty YearVisibleProperty YearVisibleProperty

Gets the identifier for the YearVisible dependency property.

public : static DependencyProperty YearVisibleProperty { get; }public static DependencyProperty YearVisibleProperty { get; }Public Static ReadOnly Property YearVisibleProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the YearVisible dependency property.

Attributes

Methods

ShowAtAsync(FrameworkElement) ShowAtAsync(FrameworkElement) ShowAtAsync(FrameworkElement)

Begins an asynchronous operation to show the date picker placed in relation to the specified element.

public : IAsyncOperation<IReference<DateTime>> ShowAtAsync(FrameworkElement target)public IAsyncOperation<Nullable<DateTimeOffset>> ShowAtAsync(FrameworkElement target)Public Function ShowAtAsync(target As FrameworkElement) As IAsyncOperation( Of NullableDateTimeOffset )
Parameters
target
FrameworkElement FrameworkElement FrameworkElement

The element to use as the flyout's placement target.

Returns
IAsyncOperation<IReference<DateTime>> IAsyncOperation<Nullable<DateTimeOffset>> IAsyncOperation<Nullable<DateTimeOffset>>

An asynchronous operation

Attributes

Events

DatePicked DatePicked DatePicked

Occurs when a date has been picked by the user.

public : event TypedEventHandler DatePickedpublic event TypedEventHandler DatePickedPublic Event DatePicked
Attributes

See Also