Results 1 to 2 of 2

Thread: Set date value on datefield on model

  1. #1
    Sencha User
    Join Date
    Dec 2015
    Posts
    14

    Default Set date value on datefield on model

    Hi to all,

    on my action column of my grid, I'm trying to set the new Date() on a date field.
    This my field model:

    Code:
    {
       type: 'date',
       allowNull: true,
       name: 'dataConsegna',
       dateFormat: 'Y-m-d H:i:s'
    }
    and on handler of action column this code:
    Code:
    view.getStore().getAt(rowIndex).set('dataConsegna',new Date())
    But I get always this error:
    Code:
    Uncaught TypeError: Cannot read property 'call' of undefined
        at Object.format (ext-all-rtl-debug.js?_dc=1484587724116:3928)
        at Object.dateFormat (ext-all-rtl-debug.js?_dc=1484587724116:3908)
        at constructor.date (ext-all-rtl-debug.js?_dc=1484587724116:31473)
        at constructor.defaultRenderer (ext-all-rtl-debug.js?_dc=1484587724116:131375)
        at constructor.updater (ext-all-rtl-debug.js?_dc=1484587724116:131378)
        at Object.callback (ext-all-rtl-debug.js?_dc=1484587724116:5328)
        at constructor.handleUpdate (ext-all-rtl-debug.js?_dc=1484587724116:98786)
        at constructor.onUpdate (ext-all-rtl-debug.js?_dc=1484587724116:95536)
        at constructor.fire (ext-all-rtl-debug.js?_dc=1484587724116:11888)
        at constructor.doFireEvent (ext-all-rtl-debug.js?_dc=1484587724116:12425)
    Any ideas?
    Thanks a lot
    Stefano

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    That's not an error I recognize. Are you able to recreate this issue in a test case?
    https://fiddle.sencha.com/#view/editor

Similar Threads

  1. Replies: 18
    Last Post: 24 Sep 2014, 12:00 PM
  2. [FIXED] DateField does not accept the date same as minimum date.
    By bluemartini in forum Sencha GXT Bugs
    Replies: 3
    Last Post: 5 Mar 2014, 3:02 AM
  3. How to add clear date button for DateField date picker?
    By pepez in forum Ext GWT: Discussion
    Replies: 1
    Last Post: 18 Jan 2011, 11:12 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •