DatePicker.datePattern property

Applies to Windows only

Gets or sets the display pattern for the date.

The default date pattern is day.integer(2). You can change the date pattern by changing the number of integers displayed.

Syntax


<div data-win-control="WinJS.UI.DatePicker" data-win-options="{ datePattern : value}" />


var datePattern = datePicker.datePattern;
datePicker.datePattern = datePattern;

Property value

Type: String

The date display pattern.

You can use the following patterns for this value:{day.integer} | day.integer(n)}.

Examples

The following code shows how to set a date pattern.


datePicker.datePattern = "{day.abbreviated(4)}";

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

None supported

Namespace

WinJS.UI

Library

Ui.js

See also

DatePicker

 

 

Show:
© 2014 Microsoft