1. #1
    Sencha User
    Join Date
    Dec 2012
    Posts
    30
    Answers
    3
    Vote Rating
    0
    Isnogud is on a distinguished road

      0  

    Default Unanswered: PullRefresh lastUpdated date

    Unanswered: 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 - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,404
    Answers
    3549
    Vote Rating
    849
    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


    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 @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
    Dec 2012
    Posts
    30
    Answers
    3
    Vote Rating
    0
    Isnogud is on a distinguished road

      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.

Thread Participants: 1

Tags for this Thread