Results 1 to 3 of 3

Thread: PullRefresh lastUpdated date

  1. #1
    Sencha Premium Member
    Join Date
    Dec 2012
    Posts
    70
    Answers
    4
    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 User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,062
    Answers
    3976
    Vote Rating
    1391
      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
    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 Premium Member
    Join Date
    Dec 2012
    Posts
    70
    Answers
    4
    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
  •