开发者

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');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜