onEndDateChange(oEvent){
const sValue = oEvent.getParameter('value');
const endDate = new Date(sValue).getTime();
let oControl = oEvent.getSource();
let object = oControl.getBindingContext("OtherModel").getObject();
let tag = /^d{1,4}(-)(1[0-2]|0?[1-9])1(0?[1-9]|[1-2]d|30|31)$/.test(object.endDate);
if(!tag) {
MessageBox.error("非法的日期格式");
oEvent.getSource().setValue("");
}
if(object.startDate) {
let startDate = new Date(object.startDate).getTime();
if(startDate > endDate) {
oEvent.getSource().setValue("");
MessageBox.error("结束日期不能早于开始日期");
}
}
},
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
机房租用,北京机房租用,IDC机房托管, http://www.e1idc.net