Hybrid View

  1. #1
    Sencha User
    Join Date
    May 2010
    Posts
    101
    Vote Rating
    0
    paulharv is on a distinguished road

      0  

    Question DateField: how to get its value

    DateField: how to get its value


    I define a date field within a Window like this...


    Code:
    new Ext.Window({
      ...
      bbar :[
        {
            xtype : 'datefield',
            fieldLabel : 'Choose Date',
            id : 'chooseDate',
            listeners : {
               'select': onDateChange
            }
         }
         ....]
      ...
    }
    And then I try to set the value of the field like this

    Code:
    Ext.get('chooseDate').setValue('04/02/2010');
    But I get the error "Error: Ext.get("chooseDate").setValue is not a function"
    Ext.get('chooseDate').getValue() works just fine.

    So it seems that I'm getting the DOM element which the DateeField is attached to, but not the fully fledged DateField object itself.
    How would I do that?

    Thanks,

    Paul

  2. #2
    Ext User Ytorres's Avatar
    Join Date
    Jun 2007
    Location
    Rennes, France
    Posts
    285
    Vote Rating
    0
    Ytorres is on a distinguished road

      0  

    Default


    Hi,

    Ext.get() get the element for a particular component.

    You should use Ext.getCmp() to get the component itself.

    See the doc about Ext.getCmp() :
    http://www.extjs.com/deploy/dev/docs/?class=Ext

    Best,
    Yannick
    "Software is like sex: it's better when it's free" - Linus Torvald
    https://edit.php.net - A tool written with ExtJs for translated Php documentation

  3. #3
    Sencha User
    Join Date
    May 2010
    Posts
    101
    Vote Rating
    0
    paulharv is on a distinguished road

      0  

    Default


    Thank you! I do now recall reading that somewhere.

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi