Results 1 to 6 of 6

Thread: Bug in DatePicker

    Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-3068 in a recent build.
  1. #1
    Ext JS Premium Member
    Join Date
    Oct 2010
    Location
    West Germany
    Posts
    65
    Vote Rating
    5
      0  

    Default Bug in DatePicker

    REQUIRED INFORMATIONExt version tested:
    • Sencha 2.0.1
    Browser versions tested against:
    • Any
    Description:
    • Wrong init of of the DatePicker slot
    Possible fix:
    • provided
    Attached Files Attached Files

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

    Default

    What is the bug?
    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
    Ext JS Premium Member
    Join Date
    Oct 2010
    Location
    West Germany
    Posts
    65
    Vote Rating
    5
      0  

    Default

    in function setValue() last slot always inited to wrong value. Does not matter find it in loop or not.


    Code:
        setValue: function(values, animated) {        var me = this,
                slots = me.getInnerItems(),
                ln = slots.length,
                key, slot, loopSlot, i, value;
    
    
            if (!values) {
                values = {};
                for (i = 0; i < ln; i++) {
                    //set the value to false so the slot will return null when getValue is called
                    values[slots[i].config.name] = null;
                }
            }
    
    
            for (key in values) {
                slot = null; // missed 
                value = values[key];
                for (i = 0; i < slots.length; i++) {
                    loopSlot = slots[i];
                    if (loopSlot.config.name == key) {
                        slot = loopSlot;
                        break;
                    }
                }
    
    
                if (slot) {
                    if (animated) {
                        slot.setValueAnimated(value);
                    } else {
                        slot.setValue(value);
                    }
                }
            }
    
    
            me._values = me._value = values;
    
    
            return me;
        },

  4. #4
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    Thanks for the report. Basically this happens when you pass in a value that has a property that doesn't match a slot?
    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

  5. #5
    Ext JS Premium Member
    Join Date
    Oct 2010
    Location
    West Germany
    Posts
    65
    Vote Rating
    5
      0  

    Default

    No, the configured last slot always ?inits wrong if it is not the last element of total slots collection

  6. #6
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    19
      0  

    Default

    This has been fixed for the next release.

    Sencha Inc

    Jamie Avins

    @jamieavins

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
  •