X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/3789b528d8dd8aad4558e38e22d775bcab1cbd36..f562e4c6e5fac7bcb445985b99acbea4d706e6f0:/docs/source/Time2.html diff --git a/docs/source/Time2.html b/docs/source/Time2.html index 26f9b20f..fcb11d8c 100644 --- a/docs/source/Time2.html +++ b/docs/source/Time2.html @@ -3,8 +3,8 @@
/** - * @class Ext.picker.Time - * @extends Ext.view.BoundList - * <p>A time picker which provides a list of times from which to choose. This is used by the - * {@link Ext.form.field.Time} class to allow browsing and selection of valid times, but could also be used - * with other components.</p> - * <p>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 {@link #minValue}, {@link #maxValue}, and - * {@link #increment} configuration properties. The format of the times presented in the list can be - * customized with the {@link #format} config.</p> - * <p>To handle when the user selects a time from the list, you can subscribe to the {@link #selectionchange} - * event.</p> +/** + * 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. * - * {@img Ext.picker.Time/Ext.picker.Time.png Ext.picker.Time component} + * 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 {@link #minValue}, {@link #maxValue}, and {@link #increment} + * configuration properties. The format of the times presented in the list can be customized with the {@link #format} + * config. * - * ## Code - new 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() - }); + * To handle when the user selects a time from the list, you can subscribe to the {@link #selectionchange} event. * - * @constructor - * Create a new TimePicker - * @param {Object} config The config object - * - * @xtype timepicker + * @example + * 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() + * }); */ Ext.define('Ext.picker.Time', { extend: 'Ext.view.BoundList', @@ -51,27 +41,27 @@ Ext.define('Ext.picker.Time', { /** * @cfg {Date} 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. Defaults to undefined. + * 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. */ /** * @cfg {Date} 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. Defaults to undefined. + * 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. */ /** * @cfg {Number} increment - * The number of minutes between each time value in the list (defaults to 15). + * The number of minutes between each time value in the list. */ increment: 15, /** * @cfg {String} format - * The default time format string which can be overriden for localization support. The format must be - * valid according to {@link Ext.Date#parse} (defaults to 'g:i A', e.g., '3:15 PM'). For 24-hour time - * format try 'H:i' instead. + * The default time format string which can be overriden for localization support. The format must be valid + * according to {@link Ext.Date#parse} (defaults to 'g:i A', e.g., '3:15 PM'). For 24-hour time format try 'H:i' + * instead. */ format : "g:i A", @@ -86,34 +76,34 @@ Ext.define('Ext.picker.Time', { * @private * Year, month, and day that all times will be normalized into internally. */ - initDate: [2008,1,1], + initDate: [2008,0,1], componentCls: Ext.baseCSSPrefix + 'timepicker', - /** + /** * @hide */ - loadingText: '', + loadMask: false, initComponent: function() { var me = this, dateUtil = Ext.Date, clearTime = dateUtil.clearTime, - initDate = me.initDate.join('/'); + initDate = me.initDate; // Set up absolute min and max for the entire day - me.absMin = clearTime(new Date(initDate)); - me.absMax = dateUtil.add(clearTime(new Date(initDate)), 'mi', (24 * 60) - 1); + me.absMin = clearTime(new Date(initDate[0], initDate[1], initDate[2])); + me.absMax = dateUtil.add(clearTime(new Date(initDate[0], initDate[1], initDate[2])), 'mi', (24 * 60) - 1); me.store = me.createStore(); me.updateList(); - this.callParent(); + me.callParent(); }, /** - * Set the {@link #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. + * Set the {@link #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. * @param {Date} value */ setMinValue: function(value) { @@ -122,8 +112,8 @@ Ext.define('Ext.picker.Time', { }, /** - * Set the {@link #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. + * Set the {@link #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. * @param {Date} value */ setMaxValue: function(value) { @@ -139,13 +129,13 @@ Ext.define('Ext.picker.Time', { */ normalizeDate: function(date) { var initDate = this.initDate; - date.setFullYear(initDate[0], initDate[1] - 1, initDate[2]); + date.setFullYear(initDate[0], initDate[1], initDate[2]); return date; }, /** - * Update the list of available times in the list to be constrained within the - * {@link #minValue} and {@link #maxValue}. + * Update the list of available times in the list to be constrained within the {@link #minValue} + * and {@link #maxValue}. */ updateList: function() { var me = this,