Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    5
    Vote Rating
    0
    jardel is on a distinguished road

      0  

    Default Overridden date format in Ext.plugin.PullRefresh

    Overridden date format in Ext.plugin.PullRefresh


    REQUIRED INFORMATION:
    • ST2
    Description:
    • Date format provided by user in config is overriden with default format "m/d/Y h:iA"
    • example config: pullTpl: [ '<div class="x-list-pullrefresh">',
      '<div class="x-list-pullrefresh-arrow"></div>',
      '<div class="x-loading-spinner">',
      '<span class="x-loading-top"></span>',
      '<span class="x-loading-right"></span>',
      '<span class="x-loading-bottom"></span>',
      '<span class="x-loading-left"></span>',
      '</div>',
      '<div class="x-list-pullrefresh-wrap">',
      '<h3 class="x-list-pullrefresh-message">{message}</h3>',
      '<div class="x-list-pullrefresh-updated">Last changed: <span>{lastUpdated:date("d/m/Y H:i")}</span></div>',
      '</div>',
      '</div>'
      ].join('')
    • overridden in sencha-touch-all-debug.js, line 62639, me.updatedEl.setHtml(Ext.util.Format.date(me.lastUpdated, "m/d/Y h:iA"));
    • Date format provided by user in config "d/m/Y H:i" is overriden with "m/d/Y h:iA". This is done on second pull to refresh action.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,824
    Vote Rating
    836
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    In 2.0.1 RC the two format strings are the same "m/d/Y h:iA". Is this thread to make it configurable then?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Nov 2011
    Posts
    5
    Vote Rating
    0
    jardel is on a distinguished road

      0  

    Default


    It is configurable, but it is not working correctly. User can set custom date format in pullTpl config:
    Code:
    '<div class="x-list-pullrefresh-updated">Last changed: <span>{lastUpdated:date("d/m/Y H:i")}</span></div>',

    If you set this in your pullTpl config, first pull action will show correct date. But next pull will use default hardcoded date format and user's configured format is lost. This is because of:


    Code:
    me.updatedEl.setHtml(Ext.util.Format.date(me.lastUpdated, "m/d/Y h:iA"));

    in method resetRefreshState in Ext.plugin.PullRefresh class.

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,824
    Vote Rating
    836
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Configurable meaning that you need to set a config to use the same. The line with the date format won't be able to get the date format string from the template.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha User
    Join Date
    Aug 2012
    Posts
    16
    Vote Rating
    0
    GillesK is on a distinguished road

      0  

    Default


    Old thread but still true with 2.0.1
    Can we resolve this issue ? How ?

Thread Participants: 2