Minimum X days to submit Leave Application prior to the planned leave of absences

Would really appreciate if anyone could help.

How do I set a Leave Application rule for the minimum the Leave Application to be submitted X days prior to the planned leave of absence and within X days after an unplanned sick leave.

1 Like

You will have to write a custom script for that.

Refer https://erpnext.com/docs/user/manual/en/customize-erpnext/custom-scripts/date-validation .