DatePickerFlyout DatePickerFlyout DatePickerFlyout DatePickerFlyout 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// This API is not available in Javascript.
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() DatePickerFlyout()

Initializes a new instance of the DatePickerFlyout class.

public : DatePickerFlyout()public DatePickerFlyout()Public Sub New()// This API is not available in Javascript.

Properties

CalendarIdentifier 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// This API is not available in Javascript.
Value
PlatForm::String string string string

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

CalendarIdentifierProperty 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// This API is not available in Javascript.

Date 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// This API is not available in Javascript.
Value
DateTime DateTimeOffset DateTimeOffset DateTimeOffset

The date currently set in the picker.

DateProperty 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// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the Date dependency property.

DayFormat 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// This API is not available in Javascript.
<DatePickerFlyout DayFormat="formatString"/>
Value
PlatForm::String string string string

The display format for the day value.

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 DayFormatProperty

Identifies the DayFormat dependency property.

public : static DependencyProperty DayFormatProperty { get; }public static DependencyProperty DayFormatProperty { get; }Public Static ReadOnly Property DayFormatProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the DayFormat dependency property.

See Also

DayVisible 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// This API is not available in Javascript.
Value
PlatForm::Boolean bool bool bool

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

DayVisibleProperty 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// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the DayVisible dependency property.

MaxYear 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// This API is not available in Javascript.
Value
DateTime DateTimeOffset DateTimeOffset DateTimeOffset

The maximum Gregorian year available for picking.S

MaxYearProperty 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// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the MaxYear dependency property.

MinYear 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// This API is not available in Javascript.
Value
DateTime DateTimeOffset DateTimeOffset DateTimeOffset

The minimum Gregorian year available for picking.

MinYearProperty 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// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the MinYear dependency property.

MonthFormat 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// This API is not available in Javascript.
<DatePickerFlyout MonthFormat="formatString"/>
Value
PlatForm::String string string string

The display format for the month value.

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 MonthFormatProperty

Identifies the MonthFormat dependency property.

public : static DependencyProperty MonthFormatProperty { get; }public static DependencyProperty MonthFormatProperty { get; }Public Static ReadOnly Property MonthFormatProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the MonthFormat dependency property.

See Also

MonthVisible 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// This API is not available in Javascript.
Value
PlatForm::Boolean bool bool bool

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

MonthVisibleProperty 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// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the MonthVisible dependency property.

YearFormat 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// This API is not available in Javascript.
<DatePickerFlyout YearFormat="formatString"/>
Value
PlatForm::String string string string

The display format for the year value.

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 YearFormatProperty

Identifies the YearFormat dependency property.

public : static DependencyProperty YearFormatProperty { get; }public static DependencyProperty YearFormatProperty { get; }Public Static ReadOnly Property YearFormatProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the YearFormat dependency property.

See Also

YearVisible 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// This API is not available in Javascript.
Value
PlatForm::Boolean bool bool bool

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

YearVisibleProperty 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// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the YearVisible dependency property.

Methods

ShowAtAsync(FrameworkElement) 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 )// This API is not available in Javascript.
Parameters
target
FrameworkElement FrameworkElement FrameworkElement FrameworkElement

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

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

An asynchronous operation

Events

DatePicked DatePicked DatePicked DatePicked

Occurs when a date has been picked by the user.

public : event TypedEventHandler DatePicked<DatePickerFlyout,  DatePickedEventArgs>public event TypedEventHandler DatePicked<DatePickerFlyout,  DatePickedEventArgs>Public Event DatePicked<DatePickerFlyout,  DatePickedEventArgs>// This API is not available in Javascript.

See Also