DatePicker.yearPattern property

Applies to Windows only

Gets or sets the display pattern for the year.

Syntax


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


var yearPattern = datePicker.yearPattern;
datePicker.yearPattern = yearPattern;

Property value

Type: String

The display pattern for the year. The default year pattern is year.full. You can change the year pattern to the following values:

year.abbreviated(n)

You can use abbreviated with or without specifying the number of letters in the abbreviation.

Examples

The following code shows how to set a year pattern.


datePicker.yearPattern = "{year.abbreviated(2)}";

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