DateField的用法 menuListeners
var strDate = new Ext.form.DateField({
applyTo: "txtId",
width:200,
allowBlank:true, //允许为空
readOnly:false,
value: '',
format:'Y-m-d'
});
strDate.menuListeners.select = function(menu, date) {
//set the date
this.setValue(date);
enterOrTabDate('funDate');
}
//相应Date的enter和Tab事件
function enterOrTabDate(param)
{
//debugger
var strDate = "";
var obj;
obj = document.getElementById("<%=tdDate.ClientID %>");
if (obj != "undefined")
{
strDN = obj.value;
if (strDN != "")
{
eval(param + "('" + strDN + "');");
}
}
else
{
alert("Error");
}
}
//调用后台事件,重新加载cmbPO,默认为空
function funDate(returnValue)
{
document.getElementById("<%= hidDate.ClientID%>").value = returnValue;
document.getElementById("<%=btnDateHid.ClientID%>").click();
document.getElementById("<%= hidDate.ClientID%>").value = "";
}