-
7 Aug 2007 2:59 PM #1
datefield: setting datepicker config-options on create?
datefield: setting datepicker config-options on create?
hi together,
i wonder if it is possible to configurate the datepicker-item while creating a datefield.
i think on something like:
in the api docs i found in the source of the dateField:Code:new Ext.form.DateField({ msgTarget: "side", fieldLabel: 'Birthday', name: 'dateOfBirth', width:150, format:'d.m.Y', {okText:"This Day", monthYearText:"Choose your birthdate"} })
so, there are some config-option that can be set, but not all?Code:Ext.apply(this.menu.picker, { minDate : this.minValue, maxDate : this.maxValue, disabledDatesRE : this.ddMatch, disabledDatesText : this.disabledDatesText, disabledDays : this.disabledDays, disabledDaysText : this.disabledDaysText, format : this.format, minText : String.format(this.minText, this.formatDate(this.minValue)), maxText : String.format(this.maxText, this.formatDate(this.maxValue)) });
any idea how to extend this properly?
thanks, tobiu
-
13 Feb 2008 10:49 AM #2
I'd like to repeat tobiu's question. When creating a dateField, I can specify disabledDays and it is reflected in the date picker. I want to also be able to specify maxDate.
In any case, how do I access the datePicker object that gets auto-created by the dateField? I'd like to set maxDays on the datePicker.
Thanks!
-
21 Feb 2008 3:42 AM #3
i solved it like this:
after including the ext-all, include the language package and if you dont like names, change it there.Code:include("../extJS/ext-2.0.1/ext-all.js"); include("../extJS/ext-2.0.1/build/locale/ext-lang-de.js");
kind regards, tobiu
-
21 Feb 2008 7:33 AM #4
-
22 Feb 2008 2:20 PM #5
i does not solve the problem, but you can globally at least change the month-names and such things in the calendar of the datefield.
kind regards, tobiu


Reply With Quote