Clear Up
SharpKit Reference

Time Class

A time picker which provides a list of times from which to choose. This is used by the Ext.form.field.Time class to allow browsing and selection of valid times, but could also be used with other components.

By default, all times starting at midnight and incrementing every 15 minutes will be presented. This list of available times can be controlled using the minValue, maxValue, and increment configuration properties. The format of the times presented in the list can be customized with the format config.

To handle when the user selects a time from the list, you can subscribe to the selectionchange event.

  
    Ext.create('Ext.picker.Time', {
            width: 60,
            minValue: Ext.Date.parse('04:30:00 AM', 'h:i:s A'),
            maxValue: Ext.Date.parse('08:00:00 AM', 'h:i:s A'),
            renderTo: Ext.getBody()
            });
            

Namespace: Ext.picker

Constructors

Fields

Name Description
format The default time format string which can be overriden for localization support. The format must be valid according to Ext.Date.parse. Defaults to 'g:i A', e.g., '3:15 PM'. For 24-hour time format try 'H:i' instead.
increment The number of minutes between each time value in the list. Defaults to: 15
maxValue The maximum time to be shown in the list of times. This must be a Date object (only the time fields will be used); no parsing of String values will be done.
minValue The minimum time to be shown in the list of times. This must be a Date object (only the time fields will be used); no parsing of String values will be done.

Methods

Name Description
setMaxValue(JsDate) Set the maxValue and update the list of available times. This must be a Date object (only the time fields will be used); no parsing of String values will be done.
setMinValue(JsDate) Set the minValue and update the list of available times. This must be a Date object (only the time fields will be used); no parsing of String values will be done.
updateList() Update the list of available times in the list to be constrained within the minValue and maxValue.
© Copyright 2005-2011 SharpKit. All rights reserved.