X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/b37ceabb82336ee82757cd32efe353cfab8ec267..f5240829880f87e0cf581c6a296e436fdef0ef80:/src/widgets/form/DateField.js
diff --git a/src/widgets/form/DateField.js b/src/widgets/form/DateField.js
index 7ebc94df..db3229ae 100644
--- a/src/widgets/form/DateField.js
+++ b/src/widgets/form/DateField.js
@@ -1,5 +1,5 @@
/*!
- * Ext JS Library 3.2.2
+ * Ext JS Library 3.3.0
* Copyright(c) 2006-2010 Ext JS, Inc.
* licensing@extjs.com
* http://www.extjs.com/license
@@ -24,9 +24,9 @@ Ext.form.DateField = Ext.extend(Ext.form.TriggerField, {
* @cfg {String} altFormats
* Multiple date formats separated by "|" to try when parsing a user input value and it
* does not match the defined format (defaults to
- * 'm/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d').
+ * 'm/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j').
*/
- altFormats : "m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d",
+ altFormats : "m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j",
/**
* @cfg {String} disabledDaysText
* The tooltip to display when the date falls on a disabled day (defaults to 'Disabled')
@@ -68,6 +68,13 @@ Ext.form.DateField = Ext.extend(Ext.form.TriggerField, {
* the keyboard handler for spacebar that selects the current date (defaults to true).
*/
showToday : true,
+
+ /**
+ * @cfg {Number} startDay
+ * Day index at which the week should begin, 0-based (defaults to 0, which is Sunday)
+ */
+ startDay : 0,
+
/**
* @cfg {Date/String} minValue
* The minimum allowed date. Can be either a Javascript date object or a string date in a
@@ -132,7 +139,9 @@ disabledDates: ["^03"]
// set time to 12 noon, then clear the time
var parsedDate = Date.parseDate(value + ' ' + this.initTime, format + ' ' + this.initTimeFormat);
- if (parsedDate) return parsedDate.clearTime();
+ if (parsedDate) {
+ return parsedDate.clearTime();
+ }
}
},
@@ -385,6 +394,7 @@ dateField.setValue('2006-05-04');
disabledDaysText : this.disabledDaysText,
format : this.format,
showToday : this.showToday,
+ startDay: this.startDay,
minText : String.format(this.minText, this.formatDate(this.minValue)),
maxText : String.format(this.maxText, this.formatDate(this.maxValue))
});