Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Datefield Picker lost on month/year click

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-14607 in 5.1.0.47.
  1. #1
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    169

    Default Datefield Picker lost on month/year click

    Ext version tested:
    • Ext 5.0.1
    Browser versions tested against:
    • Chrome 36.0.1985.125
    DOCTYPE tested against:
    • <!DOCTYPE HTML>
    Description:
    • When you try to change month/year with the month-year picker the calendar picker disappears and doesn't show the selected month/year daily view
    Steps to reproduce the problem:
    The result that was expected:
    • you should see the daily view of selected month/year
    The result that occurs instead:
    • the picker has been closed

  2. #2
    Sencha Premium Member
    Join Date
    Jun 2014
    Posts
    27

    Default

    Problem confirmed on Firefox 31.0

  3. #3
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,240

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

  4. #4
    Sencha User
    Join Date
    Aug 2013
    Posts
    77

    Default

    Is there any workaround or a overwrite we can use? The release of 5.0.2 will probably not be in the next few weeks...

  5. #5
    Sencha Premium Member
    Join Date
    Aug 2014
    Posts
    7

    Default

    I would love to know a workaround too, please.

  6. #6
    Sencha Premium Member
    Join Date
    Jun 2014
    Posts
    5

    Default

    me too.

  7. #7

  8. #8
    Sencha User
    Join Date
    Aug 2013
    Posts
    77

    Default

    Could you please repost the answer, its just for the premium members..

  9. #9
    Sencha Premium Member
    Join Date
    Jun 2014
    Posts
    5

    Default

    I'm getting this from the URL above:you do not have permission to access this page. This could be due to one of several reasons:Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

  10. #10
    Sencha Premium Member
    Join Date
    Aug 2014
    Posts
    7

    Default

    Here it is:

    Code:
    Ext.define('EXTJS-14607.picker.Date', {
        override: 'Ext.picker.Date',
    
    
        runAnimation: function(isHide) {
            var me = this,
                picker = this.monthPicker,
                options = {
                    duration: 200,
                    callback: function() {
                        picker.setVisible(!isHide);
                        // See showMonthPicker
                        picker.ownerCmp = isHide ? null : me;
                    }
                };
    
    
            if (isHide) {
                picker.el.slideOut('t', options);
            } else {
                picker.el.slideIn('t', options);
            }
        },
    
    
        hideMonthPicker: function(animate) {
            var me = this,
                picker = me.monthPicker;
    
    
            if (picker && picker.isVisible()) {
                if (me.shouldAnimate(animate)) {
                    me.runAnimation(true);
                } else {
                    picker.hide();
                    // See showMonthPicker
                    picker.ownerCmp = null;
                }
            }
            return me;
        },
    
    
        showMonthPicker: function(animate) {
            var me = this,
                el = me.el,
                picker;
    
    
            if (me.rendered && !me.disabled) {
                picker = me.createMonthPicker();
                if (!picker.isVisible()) {
                    picker.setValue(me.getActive());
                    picker.setSize(el.getSize());
                    picker.setPosition(-el.getBorderWidth('l'), -el.getBorderWidth('t'));
                    if (me.shouldAnimate(animate)) {
                        me.runAnimation(false);
                    } else {
                        picker.show();
                        // We need to set the ownerCmp so that owns() can correctly
                        // match up the component hierarchy, however when positioning the picker
                        // we don't want it to position like a normal floater because we render it to 
                        // month picker element itself.
                        picker.ownerCmp = me;
                    }
                }
            }
            return me;
        }
    });

    You can use: Ext.override(Ext.picker.Date, { .... on Ext.onReady

Page 1 of 2 12 LastLast

Posting Permissions

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