Results 1 to 8 of 8

Thread: DatePicker display format

  1. #1
    Sencha User
    Join Date
    Jun 2009
    Posts
    419
    Vote Rating
    2
      0  

    Default DatePicker display format

    Is it possible to specify the display format of a DatePicker control e.g. 'd-M-Y'? I couldn't see anything obvious in the API docs.

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,050
    Vote Rating
    1381
      0  

    Default

    It looks like it gets set off of Ext.util.Format.defaultDateFormat
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Jun 2009
    Posts
    419
    Vote Rating
    2
      0  

    Default

    I can't see that in the API docs, where can I find this?

  4. #4
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,050
    Vote Rating
    1381
      0  

    Default

    Quote Originally Posted by parky128 View Post
    I can't see that in the API docs, where can I find this?
    I looked at the source... the updateValue method. Don't be afraid to look at the source, it's actually quite small for DatePicker
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  5. #5
    Sencha User
    Join Date
    Jun 2009
    Posts
    419
    Vote Rating
    2
      0  

    Default

    I have just taken a look at the source too (for PR3) and cannot see any updateValue function.

    Im looking in src\picker\date.js is this the correct file?

  6. #6
    Sencha User
    Join Date
    Jun 2009
    Posts
    419
    Vote Rating
    2
      0  

    Default

    I answered my own question, was looking at the wrong source file! I have found what I'm looking for now, and got the date picker displaying in the format I require.

    I am using MVC and in my launch method I am setting it like so:

    Code:
    Ext.util.Format.defaultDateFormat = 'd-M-Y';

  7. #7
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,050
    Vote Rating
    1381
      0  

    Default

    Still think it would be nice to be able to override it in the config object
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  8. #8
    Sencha User rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,159
    Vote Rating
    8
      0  

    Default

    Agreed. I added it as a ticket.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

Posting Permissions

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