-
12 Nov 2012 7:39 AM #1
Unanswered: Broken picker icon when extending Ext.form.field.Picker
Unanswered: 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:
This results in the broken icon shown in the attachment to this post.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(); } } }); } });
Can anyone tell me if/where I might be going wrong?
Many thanksLast edited by dawesi; 12 Nov 2012 at 9:28 AM. Reason: Code Formatting
-
14 Nov 2012 10:14 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,599
- Vote Rating
- 435
- Answers
- 3102
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 @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.


Reply With Quote