1. #1
    Sencha User
    Join Date
    Mar 2011
    Posts
    208
    Answers
    2
    Vote Rating
    0
    bee is on a distinguished road

      0  

    Default Answered: Uncaught TypeError: Object [object DOMWindow] has no method 'getDate'

    Answered: Uncaught TypeError: Object [object DOMWindow] has no method 'getDate'


    Hi I am trying to format date as below
    datetime = Ext.Date.format(grid.data.date_time,'d/m/y H:i');
    when I save the record it saves properly in the above format, but I am getting the error at console.
    Uncaught TypeError: Object [object DOMWindow] has no method 'getDate'

    When I expand this error message, in the js file, it was pointing to above line of code, please let me know, am I doing the right way of conversion. I am using extjs 4.0.7

  2. Please always post the full stacktrace (with line numbers) when requesting help with an error.

    It seems that grid.data.date_time is undefined. console.log() it on the line before to confirm.

  3. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,585
    Answers
    540
    Vote Rating
    319
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    Please always post the full stacktrace (with line numbers) when requesting help with an error.

    It seems that grid.data.date_time is undefined. console.log() it on the line before to confirm.

  4. #3
    Sencha User
    Join Date
    Mar 2011
    Posts
    208
    Answers
    2
    Vote Rating
    0
    bee is on a distinguished road

      0  

    Default


    Yes it could be coz initially when I load my gridpanel date field is empty initially
    when i enter date and format then it suppose to save in database.
    when I changed my code from Ext.Date.format to Ext.util.Format.date it is working fine,
    Can you please suggest me how to set default value to date field before I load gridpanel.
    The scenario is when I load panel, my gridpanel has two columns as empty with the help of cell editing i enter the date, the initially datefield displays as nothing . please suggest to set default value for datefield in gridpanel.
    my datefield defined in gridpanel as below :

  5. #4
    Sencha User
    Join Date
    Mar 2011
    Posts
    208
    Answers
    2
    Vote Rating
    0
    bee is on a distinguished road

      0  

    Default


    Quote Originally Posted by bee View Post
    Yes it could be coz initially when I load my gridpanel date field is empty initially
    when i enter date and format then it suppose to save in database.
    when I changed my code from Ext.Date.format to Ext.util.Format.date it is working fine,
    Can you please suggest me how to set default value to date field before I load gridpanel.
    The scenario is when I load panel, my gridpanel has two columns as empty with the help of cell editing i enter the date, the initially datefield displays as nothing . please suggest to set default value for datefield in gridpanel.
    my datefield defined in gridpanel as below :
    Code:
    {
           header        : 'Date/Time', 
            name         : 'date_time',
            dataIndex     : 'date_time',
             id             : 'date_time',
            renderer     : Ext.util.Format.dateRenderer('d/m/Y H:i'),
              width         : 175,
                   editor         : {
                        xtype     : 'xdatetime',
                         value         : Ext.Date.format(new Date(),'d/m/Y H:i'),
                           dateFormat : 'd/m/Y',
                             timeFormat : 'H:i'
                             },                        
                                allowBlank    : true
                                }

  6. #5
    Sencha User
    Join Date
    Mar 2011
    Posts
    208
    Answers
    2
    Vote Rating
    0
    bee is on a distinguished road

      0  

    Default


    can anyone reply here ?

  7. #6
    Sencha User
    Join Date
    Mar 2011
    Posts
    208
    Answers
    2
    Vote Rating
    0
    bee is on a distinguished road

      0  

    Default


    yes it is. If I add single row only for other rows i get this message. but I am not sure how to fix it.

Thread Participants: 1

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