Results 1 to 3 of 3

Thread: PullRefresh lastUpdated date

  1. #1
    Sencha Premium Member
    Join Date
    Dec 2012
    Posts
    50
    Answers
    3
    Vote Rating
    0
      0  

    Default PullRefresh lastUpdated date

    Hello!

    How can I change the dateformat of "lastUpdated" in the PullRefresh-plugin?

    I found this in the sourcecode:
    (PullRefresh.js : 92)
    Code:
    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">{lastUpdatedText}&nbsp;{lastUpdated:date("m/d/Y h:iA")}</div>',
                    '</div>',
                '</div>'
            ].join(''),
    And copied the whole tpl to my list and changed the dateformat.
    But after the first refresh, the date is changed back again here:
    (PullRefresh.js : 394)
    Code:
        resetRefreshState: function() {
            var me = this;
    
    
            me.isRefreshing = false;
            me.lastUpdated = new Date();
    
    
            me.setViewState('pull');
            me.updatedEl.setHtml(this.getLastUpdatedText() + '&nbsp;' + Ext.util.Format.date(me.lastUpdated, "m/d/Y h:iA"));
        }
    Is there a solution without editing the file?

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,551
    Answers
    3931
    Vote Rating
    1271
      0  

    Default

    Looks like you ran into this bug: http://www.sencha.com/forum/showthread.php?253306

    Can confirm this has been fixed in 2.2.0 b2 that was released yesterday.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha Premium Member
    Join Date
    Dec 2012
    Posts
    50
    Answers
    3
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by mitchellsimoens View Post
    Looks like you ran into this bug: http://www.sencha.com/forum/showthread.php?253306

    Can confirm this has been fixed in 2.2.0 b2 that was released yesterday.

    Yup. I've seen this today. Thanks for fixing this and the sorters problem in the pullrefresh-plugin.

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
  •