现在我使用 extjs 3.4 得到这个表单:
config = Ext.apply({
title: 'Fluxo de Reincidencia',
id: 'formKMLRcd',
name: 'formKMLRcd',
border: true,
bodyStyle: "padding: 10px",
layout: "form",
autoScroll: false,
items: [{
xtype: "datefield",
ref: "../extent",
anchor: "100%",
fieldLabel: 'Data Inicio',
emptyText: 'informe a data de inicio',
name: 'txtRcdDataInicio',
id: 'txtRcdDataInicio',
format: 'd/m/Y',
altFormats: 'd/m/Y',
allowBlank: false,
validator: function (value) {
var date = this.parseDate(this.getValue());
if (!date) {
return 'Informe uma data valida';
}
}
}
如何获取表单对象,我尝试使用此表达式但没有成功。
var form = Ext.getCmp('formKMLRcd').getForm();
谢谢!