Results 1 to 3 of 3

Thread: form setvalues for date

  1. #1
    Sencha User
    Join Date
    Oct 2009
    Posts
    68
    Answers
    2

    Default form setvalues for date

    Hi,

    I hava json data {..,date: '2015-05-30T12:00:00', ..} and i have form item also i'm using localization file tr-TR. when i use form.setValues(data), texfield shows value but datefield does not show value as 30/05/2015. localization file is dynamic loaded it can be en-EN

    how can i set it
    Code:
                  {
                        xtype: 'datefield',
                        fieldLabel: 'X',
                        name: 'BirthDate',
                        width: 250
                    }

  2. #2
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664
    Answers
    512

    Default

    Please make sure that the value you are trying to set on date field is included in altFormats.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid MultiSearch Plugin, Grid MultiSort Plugin, Configuring ViewModel Hierarchy


  3. #3
    Sencha User yeghikyan's Avatar
    Join Date
    Mar 2009
    Location
    München
    Posts
    574
    Answers
    99

    Default

    Code:
    {
        xtype: 'datefield',
        fieldLabel: 'X',
        name: 'BirthDate',
        // This line
        altFormats: 'c',
        width: 250
    }
    "The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague." – Edsger W. Dijkstra

Similar Threads

  1. Replies: 1
    Last Post: 3 Jun 2013, 12:33 PM
  2. Replies: 2
    Last Post: 29 Feb 2012, 11:14 AM
  3. form.setValues()
    By sreevani in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 9 Jan 2009, 2:54 AM
  4. Replies: 6
    Last Post: 5 Sep 2008, 9:40 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
  •