-Ext.DatePicker = Ext.extend(Ext.BoxComponent, {
- <div id="cfg-Ext.DatePicker-todayText"></div>/**
- * @cfg {String} todayText
- * The text to display on the button that selects the current date (defaults to <code>'Today'</code>)
- */
- todayText : 'Today',
- <div id="cfg-Ext.DatePicker-okText"></div>/**
- * @cfg {String} okText
- * The text to display on the ok button (defaults to <code>' OK '</code> to give the user extra clicking room)
- */
- okText : ' OK ',
- <div id="cfg-Ext.DatePicker-cancelText"></div>/**
- * @cfg {String} cancelText
- * The text to display on the cancel button (defaults to <code>'Cancel'</code>)
- */
- cancelText : 'Cancel',
- <div id="cfg-Ext.DatePicker-handler"></div>/**
- * @cfg {Function} handler
- * Optional. A function that will handle the select event of this picker.
- * The handler is passed the following parameters:<div class="mdetail-params"><ul>
- * <li><code>picker</code> : DatePicker<div class="sub-desc">This DatePicker.</div></li>
- * <li><code>date</code> : Date<div class="sub-desc">The selected date.</div></li>
- * </ul></div>
- */
- <div id="cfg-Ext.DatePicker-scope"></div>/**
- * @cfg {Object} scope
- * The scope (<code><b>this</b></code> reference) in which the <code>{@link #handler}</code>
- * function will be called. Defaults to this DatePicker instance.
- */
- <div id="cfg-Ext.DatePicker-todayTip"></div>/**
- * @cfg {String} todayTip
- * A string used to format the message for displaying in a tooltip over the button that
- * selects the current date. Defaults to <code>'{0} (Spacebar)'</code> where
- * the <code>{0}</code> token is replaced by today's date.
- */
- todayTip : '{0} (Spacebar)',
- <div id="cfg-Ext.DatePicker-minText"></div>/**
- * @cfg {String} minText
- * The error text to display if the minDate validation fails (defaults to <code>'This date is before the minimum date'</code>)
- */
- minText : 'This date is before the minimum date',
- <div id="cfg-Ext.DatePicker-maxText"></div>/**
- * @cfg {String} maxText
- * The error text to display if the maxDate validation fails (defaults to <code>'This date is after the maximum date'</code>)
- */
- maxText : 'This date is after the maximum date',
- <div id="cfg-Ext.DatePicker-format"></div>/**
- * @cfg {String} format
- * The default date format string which can be overriden for localization support. The format must be
- * valid according to {@link Date#parseDate} (defaults to <code>'m/d/y'</code>).
- */
- format : 'm/d/y',
- <div id="cfg-Ext.DatePicker-disabledDaysText"></div>/**
- * @cfg {String} disabledDaysText
- * The tooltip to display when the date falls on a disabled day (defaults to <code>'Disabled'</code>)
- */
- disabledDaysText : 'Disabled',
- <div id="cfg-Ext.DatePicker-disabledDatesText"></div>/**
- * @cfg {String} disabledDatesText
- * The tooltip text to display when the date falls on a disabled date (defaults to <code>'Disabled'</code>)
- */
- disabledDatesText : 'Disabled',
- <div id="cfg-Ext.DatePicker-monthNames"></div>/**
- * @cfg {Array} monthNames
- * An array of textual month names which can be overriden for localization support (defaults to Date.monthNames)
- */
- monthNames : Date.monthNames,
- <div id="cfg-Ext.DatePicker-dayNames"></div>/**
- * @cfg {Array} dayNames
- * An array of textual day names which can be overriden for localization support (defaults to Date.dayNames)
- */
- dayNames : Date.dayNames,
- <div id="cfg-Ext.DatePicker-nextText"></div>/**
- * @cfg {String} nextText
- * The next month navigation button tooltip (defaults to <code>'Next Month (Control+Right)'</code>)
- */
- nextText : 'Next Month (Control+Right)',
- <div id="cfg-Ext.DatePicker-prevText"></div>/**
- * @cfg {String} prevText
- * The previous month navigation button tooltip (defaults to <code>'Previous Month (Control+Left)'</code>)
- */
- prevText : 'Previous Month (Control+Left)',
- <div id="cfg-Ext.DatePicker-monthYearText"></div>/**
- * @cfg {String} monthYearText
- * The header month selector tooltip (defaults to <code>'Choose a month (Control+Up/Down to move years)'</code>)
- */
- monthYearText : 'Choose a month (Control+Up/Down to move years)',
- <div id="cfg-Ext.DatePicker-startDay"></div>/**
- * @cfg {Number} startDay
- * Day index at which the week should begin, 0-based (defaults to 0, which is Sunday)
- */
- startDay : 0,
- <div id="cfg-Ext.DatePicker-showToday"></div>/**
- * @cfg {Boolean} showToday
- * False to hide the footer area containing the Today button and disable the keyboard handler for spacebar
- * that selects the current date (defaults to <code>true</code>).
- */
- showToday : true,
- <div id="cfg-Ext.DatePicker-minDate"></div>/**
- * @cfg {Date} minDate
- * Minimum allowable date (JavaScript date object, defaults to null)
- */
- <div id="cfg-Ext.DatePicker-maxDate"></div>/**
- * @cfg {Date} maxDate
- * Maximum allowable date (JavaScript date object, defaults to null)
- */
- <div id="cfg-Ext.DatePicker-disabledDays"></div>/**
- * @cfg {Array} disabledDays
- * An array of days to disable, 0-based. For example, [0, 6] disables Sunday and Saturday (defaults to null).
- */
- <div id="cfg-Ext.DatePicker-disabledDatesRE"></div>/**
- * @cfg {RegExp} disabledDatesRE
- * JavaScript regular expression used to disable a pattern of dates (defaults to null). The {@link #disabledDates}
- * config will generate this regex internally, but if you specify disabledDatesRE it will take precedence over the
- * disabledDates value.
- */
- <div id="cfg-Ext.DatePicker-disabledDates"></div>/**
- * @cfg {Array} disabledDates
- * An array of 'dates' to disable, as strings. These strings will be used to build a dynamic regular
- * expression so they are very powerful. Some examples:
- * <ul>
- * <li>['03/08/2003', '09/16/2003'] would disable those exact dates</li>
- * <li>['03/08', '09/16'] would disable those days for every year</li>
- * <li>['^03/08'] would only match the beginning (useful if you are using short years)</li>
- * <li>['03/../2006'] would disable every day in March 2006</li>
- * <li>['^03'] would disable every day in every March</li>
- * </ul>
- * Note that the format of the dates included in the array should exactly match the {@link #format} config.
- * In order to support regular expressions, if you are using a date format that has '.' in it, you will have to
- * escape the dot when restricting dates. For example: ['03\\.08\\.03'].
- */
-
- // private
- // Set by other components to stop the picker focus being updated when the value changes.
- focusOnSelect: true,
-
- // default value used to initialise each date in the DatePicker
- // (note: 12 noon was chosen because it steers well clear of all DST timezone changes)
- initHour: 12, // 24-hour format