Results 1 to 2 of 2

Thread: Broken picker icon when extending Ext.form.field.Picker

  1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    2
    Vote Rating
    0
      0  

    Default Broken picker icon when extending Ext.form.field.Picker

    Hi,

    I'm trying to create a custom picker by extending Ext.form.field.Picker but when my picker is rendered I'm seeing a kind of 'double' version of the picker icon:

    My code looks like something like this:
    Code:
    Ext.define('Calendar', {
        requires: ['Ext.form.field.Picker',
                   'CalendarView'
        ],
        
        extend: 'Ext.form.field.Picker',
        alias : 'widget.my_datefield',
        
        triggerCls : Ext.baseCSSPrefix + 'form-date-trigger',
        
        matchFieldWidth: false,
        
        initComponent: function() {
            var me = this;
    
    
            me.callParent();
        },
        
        createPicker: function() {
            var me = this;
            
            return Ext.create('CalendarView', {
                pickerField: me,
                ownerCt: me.ownerCt,
                renderTo: document.body,
                floating: true,
                hidden: true,
                focusOnShow: true,
                keyNavConfig: {
                    esc: function() {
                        me.collapse();
                    }
                }
            });
        }
    });
    This results in the broken icon shown in the attachment to this post.

    Can anyone tell me if/where I might be going wrong?

    Many thanks
    Attached Images Attached Images
    Last edited by dawesi; 12 Nov 2012 at 9:28 AM. Reason: Code Formatting

  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 some CSS and layout issue. The element for the icon needs to be like 16px wide to only show the one icon, can even do some background-repeat
    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

Posting Permissions

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