You can write a leave application in advance (or) send an email on or before the date of the leave.