1. #1
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,680
    Vote Rating
    112
    tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all

      0  

    Default 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:

    Code:
    new Ext.form.DateField({
        msgTarget: "side",
        fieldLabel: 'Birthday',
        name: 'dateOfBirth',
        width:150,
        format:'d.m.Y',
        {okText:"This Day", monthYearText:"Choose your birthdate"}
    })
    in the api docs i found in the source of the dateField:

    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))
            });
    so, there are some config-option that can be set, but not all?


    any idea how to extend this properly?


    thanks, tobiu

  2. #2
    Sencha Premium Member Troy Wolf's Avatar
    Join Date
    May 2007
    Location
    Kansas City
    Posts
    248
    Vote Rating
    2
    Troy Wolf is on a distinguished road

      0  

    Question


    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!

  3. #3
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,680
    Vote Rating
    112
    tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all

      0  

    Default


    i solved it like this:

    Code:
    include("../extJS/ext-2.0.1/ext-all.js");
    include("../extJS/ext-2.0.1/build/locale/ext-lang-de.js");
    after including the ext-all, include the language package and if you dont like names, change it there.


    kind regards, tobiu

  4. #4
    Sencha Premium Member Troy Wolf's Avatar
    Join Date
    May 2007
    Location
    Kansas City
    Posts
    248
    Vote Rating
    2
    Troy Wolf is on a distinguished road

      0  

    Default


    Quote Originally Posted by tobiu View Post
    i solved it like this:

    Code:
    include("../extJS/ext-2.0.1/ext-all.js");
    include("../extJS/ext-2.0.1/build/locale/ext-lang-de.js");
    after including the ext-all, include the language package and if you dont like names, change it there.


    kind regards, tobiu
    Huh? How does this answer the topic? Did you accidentally post this solution to the wrong thread?

  5. #5
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,680
    Vote Rating
    112
    tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all

      0  

    Default


    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

Thread Participants: 1