DatePicker.yearPattern property

This topic has not yet been rated - Rate this topic

Gets or sets 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.

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.

Examples

The following code shows how to set a year pattern.


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

Requirements

Namespace

WinJS.UI

Library

Ui.js

See also

DatePicker

 

 

Build date: 12/5/2012

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.