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 = ""; }
转载于:https://www.cnblogs.com/nanshouyong326/archive/2008/11/03/1325557.html
相关资源:数据结构—成绩单生成器