On-change of Start Date
Var startDate = Xrm.Page.getAttribute(“”); Var endDate = Xrm.Page.getAttribute(“ ”); if (startDate.getValue() > endDate.getValue()) { alert(“Start Date is greater than End Date!”); endDate.setValue(null); }
On-change of End Date
Var startDate = Xrm.Page.getAttribute(“”); Var endDate = Xrm.Page.getAttribute(“ ”); if (startDate.getValue() > endDate.getValue()) { alert(“Start Date is greater than End Date!”); startDate.setValue(null); }
Happy coding!