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

WinJS.UI.TimePicker object

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

Applies to: Metro style apps only

Allows users to select time values.

Syntax


var object = new WinJS.UI.TimePicker(parentObject);


<div data-win-clas="WinJS.UI.TimePicker"></div>

Members

The TimePicker object has these types of members:

Events

The TimePicker object has these events.

EventDescription
onchange

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

 

Methods

The TimePicker object has these methods.

MethodDescription
addEventListener

Adds an event listener.

dispatchEvent

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

raiseEvent

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

removeEventListener

Removes a listener for the specified event.

TimePicker

Initializes a new instance of a TimePicker control.

 

Properties

The TimePicker object has these properties.

PropertyDescription

clock

>Gets or sets the type of clock to display (12HourClock or 24HourClock). It defaults to the user setting.

current

Gets or sets the current date (and time) of the TimePicker.

disabled

Specifies whether the TimePicker is disabled

element

Gets the DOM element for the TimePicker.

hourPattern

Gets or sets the display pattern for the hour.

minuteIncrement

Gets or sets the minute increment. For example, 15 specifies that the TimePicker minute control should display only the choices 00, 15, 30, 45.

minutePattern

Gets or sets the display pattern for the minute.

periodPattern

String'>Gets or sets the display pattern for the period (AM/PM).

yearPattern

Gets or sets the display pattern for the year.

 

Remarks

Styling the TimePicker

CSS classes

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

CSS classDescription

win-timepicker

Styles the entire TimePicker control.

win-timepicker-hour

win-timepicker-minute

win-timepicker-period

 

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