PDA

View Full Version : Transform alternative in Extjs4?



jakepogo
14 May 2013, 1:58 PM
Hello, In Extjs 3.4 I could change an existing html form element into an ExtJS component using a property called "transform" this has been removed from Ext 4 and I cant seem to do it no matter what I do. :-? I tried using "renderTo", I tried using "contentEl", I tried a whole bunch of combinations of different things and now Im frustrated... I really want to use an extjs date picker outside of a panel or component or anything. I have built many complex programs using both versions of Ext but in THIS case I jsut need a date picker... I believe "renderTo" got the closest, provided I created the Ext Component inside Ext.onReady and set the autoRender: true flag on the 'Ext.picker.Date' object. Can anyone help?

Added *5/14/13* By the way I CAN get the Calendar to show up using a div with an ID of 'bDay', setting "renderTo: 'bDay'", and autoRender: true. BUT i need the input field to show, act like, and resemble an "Ext.picker.Date" or "Ext.form.field.Date" I dont understand why it will not work...

Actually it did work taking this html -- <div id="bDay" name="bDay" />&nbsp;</div><br />

This Extjs component
bday = Ext.create('Ext.form.field.Date', {
fieldLabel : 'Birthday',
format : 'm/d/Y',
renderTo : 'bDay',
autoRender : false,
labelWidth : 180
});

Did change it to what I needed it to.. Sorry I thought I had tried that already.