PDA

View Full Version : How to dynamicaly set format to timefield



p.tsaryk
28 Nov 2014, 1:50 AM
Hi,

I have a panel and a timefield on it.

I tried to set format in beforerender callback of my Panel:



onPanelBeforeRender: function(component, eOpts) {
...
var timefield = component.down("#time");
Ext.apply(timefield, {format: "my dynamic format"});
},


But it changed only text input format but combobox listitem format still default (see timefield-format.png). These listitems should be formatted also.

Any suggestions?

lumberjack
1 Dec 2014, 1:19 PM
The ability to dynamically change the format applied to a timefield component does not exist in any version of Ext to date. Would you like me to file a new feature request on your behalf?

The following fiddle demonstrates an alternative approach for a "dynamic" timefield format.
e99