CalendarDatePicker
CalendarDatePicker
CalendarDatePicker
CalendarDatePicker
Class
Definition
Represents a control that allows a user to pick a date from a calendar display.
public : class CalendarDatePicker : Control, ICalendarDatePicker, ICalendarDatePicker2public class CalendarDatePicker : Control, ICalendarDatePicker, ICalendarDatePicker2Public Class CalendarDatePicker Inherits Control Implements ICalendarDatePicker, ICalendarDatePicker2// This API is not available in Javascript.
- Inheritance
-
CalendarDatePickerCalendarDatePickerCalendarDatePickerCalendarDatePicker
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Inherited Members
Inherited properties
Inherited events
Inherited methods
Remarks
CalendarDatePicker is a drop down control that’s optimized for picking a single date from a calendar view where contextual information like the day of the week or fullness of the calendar is important. It’s similar to the DatePicker control, but the DatePicker is optimized for picking a known date, such as a date of birth, where the context of the calendar is not important.
You can use the CalendarDatePicker control in its default form with a minimal amount of Extensible Application Markup Language (XAML) or other code, or you can customize it in various ways to suit your app. Here's a simple CalendarDatePicker created in Extensible Application Markup Language (XAML) and code.
CalendarDatePicker arrivalCalendarDatePicker = new CalendarDatePicker();
<CalendarDatePicker x:Name="arrivalCalendarDatePicker"/>
Here's what the control look like when it's closed and a date is not selected.
Here's what it looks like with the calendar open and a date selected.
CalendarDatePicker has an internal CalendarView for picking a date. A subset of CalendarView properties, like IsTodayHighlighted and FirstDayOfWeek, exist on CalendarDatePicker and are forwarded to the internal CalendarView to let you modify it. However, you can't change the SelectionMode of the internal CalendarView to allow multiple selection. If you need to let a user pick multiple dates or need a calendar to be always visible, consider using a CalendarView instead of a CalendarDatePicker. See the CalendarView class for more info on how you can modify the calendar display.
Selecting dates
Use the Date property to get or set the selected date. By default, the Date property is null. When a user selects a date in the calendar view, this property is updated. A user can clear the date by clicking the selected date in the calendar view to deselect it.
You can set the date in your code like this.
myCalendarDatePicker.Date = new DateTime(1977, 1, 5);
When you set the Date in code, the value is constrained by the MinDate and MaxDate properties. If Date is smaller than MinDate, the value is set to MinDate. If Date is greater than MaxDate, the value is set to MaxDate.
You can handle the DateChanged event to be notified when the Date value has changed.
Formatting the selected date
You can change the display format of the day, month, and year of the selected date. The string content of the TextBox portion of the CalendarDatePicker is created by a DateTimeFormatter. You tell the DateTimeFormatter how to format the value by providing a string that is either a format template or a format pattern. For the complete list of format templates and format patterns, see the Remarks section of the DateTimeFormatter class documentation.
Here's how to specify a format in XAML and in code using format patterns.
<CalendarDatePicker x:Name="myCalendarDatePicker"
DateFormat = "{}{dayofweek.full}‎, ‎{month.full}‎ ‎{day.integer}‎, ‎{year.full}"/>
myCalendarDatePicker.DateFormat = "{dayofweek.full}‎, ‎{month.full}‎ ‎{day.integer}‎, ‎{year.full}";
The selected date looks like this with the date formatted.

Setting a header and placeholder text
You can add a Header (or label) and PlaceholderText (or watermark) to the CalendarDatePicker to give the user an indication of what it's used for. To customize the look of the header, you can set the HeaderTemplate property instead of Header. For design info, see Guidelines for labels.
The default placeholder text is "select a date ". You can remove this by setting the PlaceholderText property to an empty string, or you can provide custom text as shown here.
<CalendarDatePicker x:Name="arrivalCalendarDatePicker" Header="Arrival date" PlaceholderText="Choose your arrival date"/>
Globalization
The CalendarDatePicker supports each of the calendar systems supported by Windows. These calendars are specified in the Windows.Globalization.CalendarIdentifiers class. The CalendarDatePicker uses the correct calendar for your app's default language, or you can set the CalendarIdentifier property to use a specific calendar system.
DateTime and Calendar values
The date objects used in a CalendarDatePicker have a different representation depending on your programming language. C# and Visual Basic use the System.DateTimeOffset structure that is part of .NET. Visual C++ component extensions (C++/CX) uses the Windows::Foundation::DateTime structure. A related concept is the Calendar class, which influences how dates are interpreted in context. All Windows Runtime apps can use the Windows.Globalization.Calendar class. C# and Visual Basic apps can alternatively use the System.Globalization.Calendar class, which has very similar functionality. (Windows Runtime app can use the base .NET Calendar class but not the specific implementations for example GregorianCalendar.)
.NET also supports a type named DateTime, which is implicitly convertible to a DateTimeOffset. So you might see a "DateTime" type being used in .NET code that's used to set values that are really DateTimeOffset. For more info on the difference between DateTime and DateTimeOffset, see Remarks in DateTimeOffset.
Note
Properties that take date objects can't be set as a XAML attribute string, because the Windows Runtime XAML parser doesn't have a conversion logic for converting strings to dates as DateTime/DateTimeOffset objects. You typically set these values in code. Another possible technique is to define a date that's available as a data object or in the data context, then set the property as a XAML attribute that references a {Binding} markup extension expression that can access the date as data.
Control style and template
You can modify the default Style and ControlTemplate to give the control a unique appearance. For information about modifying a control's style and template, see Styling controls. The default style, template, and resources that define the look of the control are included in the generic.xaml file. For design purposes, generic.xaml is available in the (Program Files)\Windows Kits\10\DesignTime\CommonConfiguration\Neutral\UAP<SDK version>\Generic folder from a Windows Software Development Kit (SDK) installation. Styles and resources from different versions of the SDK might have different values.
Starting in Windows 10, version 1607 (Windows Software Development Kit (SDK) version 10.0.14393.0), generic.xaml includes resources that you can use to modify the colors of a control in different visual states without modifying the control template. In apps that target this software development kit (SDK) or later, modifying these resources is preferred to setting properties such as Background and Foreground. For more info, see the Light-weight styling section of the Styling controls article.
This table shows the resources used by the CalendarDatePicker control.
| Resource key | Description |
|---|---|
| CalendarDatePickerForeground | Header text color |
| CalendarDatePickerForegroundDisabled | Foreground color when disabled |
| CalendarDatePickerCalendarGlyphForeground | Calendar icon color |
| CalendarDatePickerCalendarGlyphForegroundDisabled | Calendar icon color when disabled |
| CalendarDatePickerTextForeground | Placeholder text color |
| CalendarDatePickerTextForegroundDisabled | Placeholder text when disabled |
| CalendarDatePickerTextForegroundSelected | Placeholder text when selected |
| CalendarDatePickerHeaderForegroundDisabled | Header text color when disabled |
| CalendarDatePickerBackground | Background color at rest |
| CalendarDatePickerBackgroundPointerOver | Background color on hover |
| CalendarDatePickerBackgroundPressed | Background color when pressed |
| CalendarDatePickerBackgroundDisabled | Background color when disabled |
| CalendarDatePickerBackgroundFocused | Background color when focused |
| CalendarDatePickerBorderBrush | Border color at rest |
| CalendarDatePickerBorderBrushPointerOver | Border color on hover |
| CalendarDatePickerBorderBrushPressed | Border color when pressed |
| CalendarDatePickerBorderBrushDisabled | Border color when disabled |
Constructors
CalendarDatePicker() CalendarDatePicker() CalendarDatePicker() CalendarDatePicker()
Initializes a new instance of the CalendarDatePicker class.
public : CalendarDatePicker()public CalendarDatePicker()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.
<CalendarDatePicker CalendarIdentifier="calendarSystem"/>
- Value
- PlatForm::String string string string
The name of the calendar system to use.
CalendarIdentifierProperty CalendarIdentifierProperty CalendarIdentifierProperty CalendarIdentifierProperty
Identifies 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.
The identifier for the CalendarIdentifier dependency property.
- See Also
CalendarViewStyle CalendarViewStyle CalendarViewStyle CalendarViewStyle
Gets or sets the Style associated with the control's internal CalendarView object.
public : Style CalendarViewStyle { get; set; }public Style CalendarViewStyle { get; set; }Public ReadWrite Property CalendarViewStyle As Style// This API is not available in Javascript.
<CalendarDatePicker CalendarViewStyle={StaticResource styleResourceKey}/>
The current style of the CalendarView object.
CalendarViewStyleProperty CalendarViewStyleProperty CalendarViewStyleProperty CalendarViewStyleProperty
Identifies the CalendarViewStyle dependency property.
public : static DependencyProperty CalendarViewStyleProperty { get; }public static DependencyProperty CalendarViewStyleProperty { get; }Public Static ReadOnly Property CalendarViewStyleProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the CalendarViewStyle dependency property.
- See Also
Date Date Date Date
Gets or sets the date currently set in the calendar picker.
public : IReference<DateTime> Date { get; set; }public Nullable<DateTimeOffset> Date { get; set; }Public ReadWrite Property Date As Nullable<DateTimeOffset>// This API is not available in Javascript.
- Value
- IReference<DateTime> Nullable<DateTimeOffset> Nullable<DateTimeOffset> Nullable<DateTimeOffset>
The date currently set in the calendar picker.
DateFormat DateFormat DateFormat DateFormat
Gets or sets the display format for the date value in the picker's text box.
public : PlatForm::String DateFormat { get; set; }public string DateFormat { get; set; }Public ReadWrite Property DateFormat As string// This API is not available in Javascript.
<CalendarDatePicker DateFormat="formatString"/>
- Value
- PlatForm::String string string string
The string format to use to display the date in the picker's text box.
DateFormatProperty DateFormatProperty DateFormatProperty DateFormatProperty
Identifies the DateFormat dependency property.
public : static DependencyProperty DateFormatProperty { get; }public static DependencyProperty DateFormatProperty { get; }Public Static ReadOnly Property DateFormatProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the DateFormat dependency property.
- See Also
DateProperty DateProperty DateProperty DateProperty
Identifies 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.
The identifier for the Date dependency property.
- See Also
DayOfWeekFormat DayOfWeekFormat DayOfWeekFormat DayOfWeekFormat
Gets or sets the display format for the day of the week headers in the picker's CalendarView.
public : PlatForm::String DayOfWeekFormat { get; set; }public string DayOfWeekFormat { get; set; }Public ReadWrite Property DayOfWeekFormat As string// This API is not available in Javascript.
<CalendarDatePicker DayOfWeekFormat="formatString"/>
- Value
- PlatForm::String string string string
The string format to use to display the day of the week headers in the picker's CalendarView.
Remarks
This property affects the CalendarDatePicker 's internal CalendarView. For more info, see CalendarView.DayOfWeekFormat.
DayOfWeekFormatProperty DayOfWeekFormatProperty DayOfWeekFormatProperty DayOfWeekFormatProperty
Identifies the DayOfWeekFormat dependency property.
public : static DependencyProperty DayOfWeekFormatProperty { get; }public static DependencyProperty DayOfWeekFormatProperty { get; }Public Static ReadOnly Property DayOfWeekFormatProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the DayOfWeekFormat dependency property.
- See Also
DisplayMode DisplayMode DisplayMode DisplayMode
Gets or sets a value that indicates whether the calendar shows selections for month, year, or decade in the picker's CalendarView.
public : CalendarViewDisplayMode DisplayMode { get; set; }public CalendarViewDisplayMode DisplayMode { get; set; }Public ReadWrite Property DisplayMode As CalendarViewDisplayMode// This API is not available in Javascript.
<CalendarDatePicker DisplayMode="calendarViewDisplayModeMemberName" />
- Value
- CalendarViewDisplayMode CalendarViewDisplayMode CalendarViewDisplayMode CalendarViewDisplayMode
A value of the enumeration that indicates whether the calendar shows selections for month, year, or decade. The default is Month.
Remarks
This property affects the CalendarDatePicker 's internal CalendarView. For more info, see CalendarView.DisplayMode.
DisplayModeProperty DisplayModeProperty DisplayModeProperty DisplayModeProperty
Identifies the DisplayMode dependency property.
public : static DependencyProperty DisplayModeProperty { get; }public static DependencyProperty DisplayModeProperty { get; }Public Static ReadOnly Property DisplayModeProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the DisplayMode dependency property.
- See Also
FirstDayOfWeek FirstDayOfWeek FirstDayOfWeek FirstDayOfWeek
Gets or sets a value that indicates which day is shown as the first day of the week in the picker's CalendarView.
public : DayOfWeek FirstDayOfWeek { get; set; }public DayOfWeek FirstDayOfWeek { get; set; }Public ReadWrite Property FirstDayOfWeek As DayOfWeek// This API is not available in Javascript.
<CalendarDatePicker FirstDayOfWeek="dayOfWeekMemberName"/>
A value of the enumeration that indicates which day is shown as the first day of the week.
Remarks
This property affects the CalendarDatePicker 's internal CalendarView. For more info, see CalendarView.FirstDayOfWeek.
FirstDayOfWeekProperty FirstDayOfWeekProperty FirstDayOfWeekProperty FirstDayOfWeekProperty
Identifies the FirstDayOfWeek dependency property.
public : static DependencyProperty FirstDayOfWeekProperty { get; }public static DependencyProperty FirstDayOfWeekProperty { get; }Public Static ReadOnly Property FirstDayOfWeekProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the FirstDayOfWeek dependency property.
- See Also
Header Header Header Header
Gets or sets the content for the calendar picker's header.
public : PlatForm::Object Header { get; set; }public object Header { get; set; }Public ReadWrite Property Header As object// This API is not available in Javascript.
<CalendarDatePicker Header="headerString"/>
- Value
- PlatForm::Object object object object
The content of the header. The default value is null.
HeaderProperty HeaderProperty HeaderProperty HeaderProperty
Identifies the Header dependency property.
public : static DependencyProperty HeaderProperty { get; }public static DependencyProperty HeaderProperty { get; }Public Static ReadOnly Property HeaderProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the Header dependency property.
- See Also
HeaderTemplate HeaderTemplate HeaderTemplate HeaderTemplate
Gets or sets the DataTemplate used to display the content of the header.
public : DataTemplate HeaderTemplate { get; set; }public DataTemplate HeaderTemplate { get; set; }Public ReadWrite Property HeaderTemplate As DataTemplate// This API is not available in Javascript.
<CalendarDatePicker>
<CalendarDatePicker.HeaderTemplate>
singleDataTemplate
</CalendarDatePicker.HeaderTemplate>
</CalendarDatePicker>
The template that specifies the visualization of the header object. The default is null.
HeaderTemplateProperty HeaderTemplateProperty HeaderTemplateProperty HeaderTemplateProperty
Identifies the HeaderTemplate dependency property.
public : static DependencyProperty HeaderTemplateProperty { get; }public static DependencyProperty HeaderTemplateProperty { get; }Public Static ReadOnly Property HeaderTemplateProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the HeaderTemplate dependency property.
- See Also
IsCalendarOpen IsCalendarOpen IsCalendarOpen IsCalendarOpen
Gets or sets a value that indicates whether the calendar view of the CalendarDatePicker is currently shown.
public : PlatForm::Boolean IsCalendarOpen { get; set; }public bool IsCalendarOpen { get; set; }Public ReadWrite Property IsCalendarOpen As bool// This API is not available in Javascript.
<CalendarDatePicker IsCalendarOpen="bool" .../>
- Value
- PlatForm::Boolean bool bool bool
true if the calendar view is shown; otherwise, false. The default is false.
IsCalendarOpenProperty IsCalendarOpenProperty IsCalendarOpenProperty IsCalendarOpenProperty
Identifies the IsCalendarOpen dependency property.
public : static DependencyProperty IsCalendarOpenProperty { get; }public static DependencyProperty IsCalendarOpenProperty { get; }Public Static ReadOnly Property IsCalendarOpenProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the IsCalendarOpen dependency property.
- See Also
IsGroupLabelVisible IsGroupLabelVisible IsGroupLabelVisible IsGroupLabelVisible
Gets or sets a value that indicates whether the month name is shown with the first day of the month in the picker's CalendarView.
public : PlatForm::Boolean IsGroupLabelVisible { get; set; }public bool IsGroupLabelVisible { get; set; }Public ReadWrite Property IsGroupLabelVisible As bool// This API is not available in Javascript.
<CalendarDatePicker IsGroupLabelVisible="bool" .../>
- Value
- PlatForm::Boolean bool bool bool
true if the month name is shown with the first day of the month; otherwise, false. The default is true.
Remarks
This property affects the CalendarDatePicker 's internal CalendarView. For more info, see CalendarView.IsGroupLabelVisible.
IsGroupLabelVisibleProperty IsGroupLabelVisibleProperty IsGroupLabelVisibleProperty IsGroupLabelVisibleProperty
Identifies the IsGroupLabelVisible dependency property.
public : static DependencyProperty IsGroupLabelVisibleProperty { get; }public static DependencyProperty IsGroupLabelVisibleProperty { get; }Public Static ReadOnly Property IsGroupLabelVisibleProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the IsGroupLabelVisible dependency property.
- See Also
IsOutOfScopeEnabled IsOutOfScopeEnabled IsOutOfScopeEnabled IsOutOfScopeEnabled
Gets or sets a value that indicates whether out-of-scope calendar items are shown with a unique foreground color in the picker's CalendarView.
public : PlatForm::Boolean IsOutOfScopeEnabled { get; set; }public bool IsOutOfScopeEnabled { get; set; }Public ReadWrite Property IsOutOfScopeEnabled As bool// This API is not available in Javascript.
<CalendarDatePicker IsOutOfScopeEnabled="bool" .../>
- Value
- PlatForm::Boolean bool bool bool
true if out-of-scope calendar items are shown with a unique color; false if they are shown with the same color as in-scope items. The default is true.
Remarks
This property affects the CalendarDatePicker 's internal CalendarView. For more info, see CalendarView.IsOutOfScopeEnabled.
IsOutOfScopeEnabledProperty IsOutOfScopeEnabledProperty IsOutOfScopeEnabledProperty IsOutOfScopeEnabledProperty
Identifies the IsOutOfScopeEnabled dependency property.
public : static DependencyProperty IsOutOfScopeEnabledProperty { get; }public static DependencyProperty IsOutOfScopeEnabledProperty { get; }Public Static ReadOnly Property IsOutOfScopeEnabledProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the IsOutOfScopeEnabled dependency property.
- See Also
IsTodayHighlighted IsTodayHighlighted IsTodayHighlighted IsTodayHighlighted
Gets or sets a value that indicates whether the current date is highlighted in the picker's CalendarView.
public : PlatForm::Boolean IsTodayHighlighted { get; set; }public bool IsTodayHighlighted { get; set; }Public ReadWrite Property IsTodayHighlighted As bool// This API is not available in Javascript.
<CalendarDatePicker IsTodayHighlighted="bool" .../>
- Value
- PlatForm::Boolean bool bool bool
true if the current date is highlighted; otherwise, false. The default is true.
Remarks
This property affects the CalendarDatePicker 's internal CalendarView. For more info, see CalendarView.IsTodayHighlighted.
IsTodayHighlightedProperty IsTodayHighlightedProperty IsTodayHighlightedProperty IsTodayHighlightedProperty
Identifies the IsTodayHighlighted dependency property.
public : static DependencyProperty IsTodayHighlightedProperty { get; }public static DependencyProperty IsTodayHighlightedProperty { get; }Public Static ReadOnly Property IsTodayHighlightedProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the IsTodayHighlighted dependency property.
- See Also
LightDismissOverlayMode LightDismissOverlayMode LightDismissOverlayMode LightDismissOverlayMode
Gets or sets a value that specifies whether the area outside of a light-dismiss UI is darkened.
public : LightDismissOverlayMode LightDismissOverlayMode { get; set; }public LightDismissOverlayMode LightDismissOverlayMode { get; set; }Public ReadWrite Property LightDismissOverlayMode As LightDismissOverlayMode// This API is not available in Javascript.
- Value
- LightDismissOverlayMode LightDismissOverlayMode LightDismissOverlayMode LightDismissOverlayMode
A value of the enumeration that specifies whether the area outside of a light-dismiss UI is darkened. The default is Auto.
| Device family |
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v3)
|
Remarks
Transient UI, such as the open calendar view of a CalendarDatePicker, closes when you click or tap outside of it. This is called light-dismiss. "Overlay" refers to the area outside of a light-dismiss UI.
By default, the "overlay" is darkened on the Xbox, and not darkened on other devices families. You can set LightDismissOverlayMode to On to make your app darken the "overlay" area on all device families, or set it to Off to not darken the "overlay" area on all device families.
Version compatibility
The LightDismissOverlayMode property is not available prior to Windows 10, version 1607. If your app’s 'minimum platform version' setting in Microsoft Visual Studio is less than the 'introduced version' shown in the Requirements block later in this page, you must design and test your app to account for this. For more info, see Version adaptive code.
To avoid exceptions when your app runs on previous versions of Windows 10, do not set this property in XAML or use it without performing a runtime check. This example shows how to use the ApiInformation class to check for the presence of this property before you set it.
private void MainPage_Loaded(object sender, RoutedEventArgs e)
{
if (ApiInformation.IsPropertyPresent("Windows.UI.Xaml.Controls.CalendarDatePicker", "LightDismissOverlayMode"))
{
calendarDatePicker1.LightDismissOverlayMode = LightDismissOverlayMode.On;
}
}
LightDismissOverlayModeProperty LightDismissOverlayModeProperty LightDismissOverlayModeProperty LightDismissOverlayModeProperty
Identifies the LightDismissOverlayMode dependency property.
public : static DependencyProperty LightDismissOverlayModeProperty { get; }public static DependencyProperty LightDismissOverlayModeProperty { get; }Public Static ReadOnly Property LightDismissOverlayModeProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the LightDismissOverlayMode dependency property.
| Device family |
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v3)
|
MaxDate MaxDate MaxDate MaxDate
Gets or sets the latest date that can be set in the picker.
public : DateTime MaxDate { get; set; }public DateTimeOffset MaxDate { get; set; }Public ReadWrite Property MaxDate As DateTimeOffset// This API is not available in Javascript.
- Value
- DateTime DateTimeOffset DateTimeOffset DateTimeOffset
The latest date that can be set.
MaxDateProperty MaxDateProperty MaxDateProperty MaxDateProperty
Identifies the MaxDate dependency property.
public : static DependencyProperty MaxDateProperty { get; }public static DependencyProperty MaxDateProperty { get; }Public Static ReadOnly Property MaxDateProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the MaxDate dependency property.
- See Also
MinDate MinDate MinDate MinDate
Gets or sets the earliest date that can be set in the picker.
public : DateTime MinDate { get; set; }public DateTimeOffset MinDate { get; set; }Public ReadWrite Property MinDate As DateTimeOffset// This API is not available in Javascript.
- Value
- DateTime DateTimeOffset DateTimeOffset DateTimeOffset
The earliest date that can be set.
MinDateProperty MinDateProperty MinDateProperty MinDateProperty
Identifies the MinDate dependency property.
public : static DependencyProperty MinDateProperty { get; }public static DependencyProperty MinDateProperty { get; }Public Static ReadOnly Property MinDateProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the MinDate dependency property.
- See Also
PlaceholderText PlaceholderText PlaceholderText PlaceholderText
Gets or sets the text that is displayed in the picker's text box until the value is changed by a user action or some other operation.
public : PlatForm::String PlaceholderText { get; set; }public string PlaceholderText { get; set; }Public ReadWrite Property PlaceholderText As string// This API is not available in Javascript.
<CalendarDatePicker PlaceholderText="string"/>
- Value
- PlatForm::String string string string
The text that is displayed in the control when no value is entered. The default is an empty string ("").
PlaceholderTextProperty PlaceholderTextProperty PlaceholderTextProperty PlaceholderTextProperty
Identifies the PlaceholderText dependency property.
public : static DependencyProperty PlaceholderTextProperty { get; }public static DependencyProperty PlaceholderTextProperty { get; }Public Static ReadOnly Property PlaceholderTextProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the PlaceholderText dependency property.
- See Also
Methods
SetDisplayDate(DateTime) SetDisplayDate(DateTime) SetDisplayDate(DateTime) SetDisplayDate(DateTime)
Shows the specified date in the calendar picker.
public : void SetDisplayDate(DateTime date)public void SetDisplayDate(DateTimeOffset date)Public Function SetDisplayDate(date As DateTimeOffset) As void// This API is not available in Javascript.
- date
- DateTime DateTimeOffset DateTimeOffset DateTimeOffset
The date to show.
Remarks
SetYearDecadeDisplayDimensions(Int32, Int32) SetYearDecadeDisplayDimensions(Int32, Int32) SetYearDecadeDisplayDimensions(Int32, Int32) SetYearDecadeDisplayDimensions(Int32, Int32)
Sets the number of rows and columns to use in the Year and Decade display modes of the picker's CalendarView.
public : void SetYearDecadeDisplayDimensions(int columns, int rows)public void SetYearDecadeDisplayDimensions(Int32 columns, Int32 rows)Public Function SetYearDecadeDisplayDimensions(columns As Int32, rows As Int32) As void// This API is not available in Javascript.
- columns
- int Int32 Int32 Int32
The number of columns in the view.
- rows
- int Int32 Int32 Int32
The number of rows in the view.
Remarks
This method affects the CalendarDatePicker 's internal CalendarView. For more info, see CalendarView.SetYearDecadeDisplayDimensions.
Events
CalendarViewDayItemChanging CalendarViewDayItemChanging CalendarViewDayItemChanging CalendarViewDayItemChanging
Occurs when a CalendarViewDayItem is loading in the picker's CalendarView.
public : event CalendarViewDayItemChangingEventHandler CalendarViewDayItemChangingpublic event CalendarViewDayItemChangingEventHandler CalendarViewDayItemChangingPublic Event CalendarViewDayItemChanging// This API is not available in Javascript.
<CalendarDatePicker CalendarViewDayItemChanging="eventhandler"/>
Remarks
This method is comes from the CalendarDatePicker 's internal CalendarView. For more info, see CalendarView.CalendarViewDayItemChanging.
Closed Closed Closed Closed
Occurs when the picker's CalendarView is hidden.
public : event EventHandler Closed<object>public event EventHandler Closed<object>Public Event Closed<object>// This API is not available in Javascript.
<CalendarDatePicker Closed="eventhandler"/>
DateChanged DateChanged DateChanged DateChanged
Occurs when the date value is changed.
public : event TypedEventHandler DateChanged<CalendarDatePicker, CalendarDatePickerDateChangedEventArgs>public event TypedEventHandler DateChanged<CalendarDatePicker, CalendarDatePickerDateChangedEventArgs>Public Event DateChanged<CalendarDatePicker, CalendarDatePickerDateChangedEventArgs>// This API is not available in Javascript.
<CalendarDatePicker DateChanged="eventhandler"/>
- See Also
Opened Opened Opened Opened
Occurs when the picker's CalendarView is shown.
public : event EventHandler Opened<object>public event EventHandler Opened<object>Public Event Opened<object>// This API is not available in Javascript.
<CalendarDatePicker Opened="eventhandler"/>