DatePicker object
TOC
Réduire la table des matières
Développer la table des matières

WinJS.UI.DatePicker object

[This documentation is preliminary and is subject to change.]

Applies to: Metro style apps only

Allows users to pick a date value.

Syntax


<div data-win-control="WinJS.UI.DatePicker"></div>


var datePicker = new WinJS.UI.DatePicker(element, options);

Members

The DatePicker object has these types of members:

Events

The DatePicker object has these events.

EventDescription
onchange

Occurs when any of the controls are changed by the user.

 

Methods

The DatePicker object has these methods.

MethodDescription
DatePicker

Initializes a new instance of the DatePicker control.

raiseEvent

Raises an event of the specified type and with additional properties.

removeEventListener

Removes a listener for the specified event.

 

Properties

The DatePicker object has these properties.

PropertyDescription

calendar

>Gets or sets the calendar to use.

current

Gets or sets the current date of the DatePicker.

datePattern

Gets or sets the display pattern for the date.

disabled

Specifies whether the DatePicker is disabled.

element

Gets the DOM element for the DatePicker.

maxYear

Gets or sets the maximum Gregorian year available for picking.

minYear

Gets or sets the minimum Gregorian year available for picking.

monthPattern

Gets or sets the display pattern for the month.

 

Remarks

Styling the DatePicker

CSS classes

To customize a DatePicker, you can define your own styles for these CSS classes (defined by the Windows Library for JavaScript style sheets):

CSS classDescription

win-datepicker

Styles the entire DatePicker control.

win-datepicker-date

win-datepicker-month

win-datepicker-year

 

Requirements

Minimum supported client

Windows 8 Consumer Preview

Minimum supported server

Windows Server 8 Beta

Namespace

WinJS.UI

Library

Ui.js

 

 

Build date: 2/10/2012

Ajouts de la communauté

AJOUTER
Afficher:
© 2017 Microsoft