fix : Student Admission accepting end date less than start date. #20625
diff --git a/erpnext/education/doctype/student_admission/student_admission.js b/erpnext/education/doctype/student_admission/student_admission.js
index d7f7454..2b62967 100644
--- a/erpnext/education/doctype/student_admission/student_admission.js
+++ b/erpnext/education/doctype/student_admission/student_admission.js
@@ -11,5 +11,12 @@
academic_year: function(frm) {
frm.trigger("program");
+ },
+
+ admission_end_date: function(frm) {
+ if(frm.doc.admission_end_date && frm.doc.admission_end_date <= frm.doc.admission_start_date){
+ frm.set_value("admission_end_date", "");
+ frappe.throw(__("Admission End Date should be greater than Admission Start Date."));
+ }
}
});