Hardcoding datefield and timefield values
timefield0 = new Ext.TimeField({});
datefield0 = new Ext.DateField({});
timefield0.setValue('9am');
datefield0.setValue('2009-09-09');
This does not work. Specified hardcoded parameter strings, whi开发者_Go百科ch display properly, are appreciated.
Your code is completely incorrect. There is no Ext.TimeField but an Ext.form.TimeField, same goes for the DateField. Try this
var timefield0 = new Ext.form.TimeField({ name: 'time', renderTo: Ext.getBody() });
var datefield0 = new Ext.form.DateField({ name: 'date', renderTo: Ext.getBody() });
timefield0.setValue('9am');
datefield0.setValue('2009-09-09');
精彩评论