Hello team,
I have implemented the leave request app in my organization about 4 months ago. everything is working fine so far.
I have only one issue of when someone tries to submit a leave request after the fact. The app does not allow for the start date to be in the past.
Is there a way to overcome this?
Thank you,
Solved! Go to Solution.
Hi @FGSDGF,
There are some small changes you have to make to fulfill your expectation. You didn't mention what kind of app have you implemented (Phone or Tablet). Let's see both of them:
1. LeaveRequest (Tablet version)
Go to Screen - NewRequest Screen and make the following changes:
Label1_13 -> Text:
If(LeaveStartDatePicker.SelectedDate > LeaveEndDatePicker.SelectedDate, "Start date must occur on or before end date")
In this way, you'll eliminate the warning message about StartDay < Today() (what you are looking for ...)
Button1_1->DisplayMode:
If(IsBlank(Trim(TextInput1.Text)) || IsBlank(LeaveStartDatePicker.SelectedDate) || IsBlank(LeaveEndDatePicker.SelectedDate) || LeaveEndDatePicker.SelectedDate < LeaveStartDatePicker.SelectedDate || IsBlank(_selectedLeaveType) || IsBlank(_selectedApprover), DisplayMode.Disabled, DisplayMode.Edit)
Here I removed LeaveStartDatePicker.SelectedDate < Today() that will allowed you to send request from past days.
2. LeaveRequest(Phone version)
It seems that Phone version hasn't implemented a restriction regarding the StartDay vs. CurrentDay so the only change you have to make is to reconsider the warning text.
So, go to SelectDatesScreen and make the following changes:
Label1 -> Text
If(LeaveStartDatePicker.SelectedDate > LeaveEndDatePicker.SelectedDate, "Start date must occur on or before end date")
Hope it helps !
Hi @FGSDGF,
There are some small changes you have to make to fulfill your expectation. You didn't mention what kind of app have you implemented (Phone or Tablet). Let's see both of them:
1. LeaveRequest (Tablet version)
Go to Screen - NewRequest Screen and make the following changes:
Label1_13 -> Text:
If(LeaveStartDatePicker.SelectedDate > LeaveEndDatePicker.SelectedDate, "Start date must occur on or before end date")
In this way, you'll eliminate the warning message about StartDay < Today() (what you are looking for ...)
Button1_1->DisplayMode:
If(IsBlank(Trim(TextInput1.Text)) || IsBlank(LeaveStartDatePicker.SelectedDate) || IsBlank(LeaveEndDatePicker.SelectedDate) || LeaveEndDatePicker.SelectedDate < LeaveStartDatePicker.SelectedDate || IsBlank(_selectedLeaveType) || IsBlank(_selectedApprover), DisplayMode.Disabled, DisplayMode.Edit)
Here I removed LeaveStartDatePicker.SelectedDate < Today() that will allowed you to send request from past days.
2. LeaveRequest(Phone version)
It seems that Phone version hasn't implemented a restriction regarding the StartDay vs. CurrentDay so the only change you have to make is to reconsider the warning text.
So, go to SelectDatesScreen and make the following changes:
Label1 -> Text
If(LeaveStartDatePicker.SelectedDate > LeaveEndDatePicker.SelectedDate, "Start date must occur on or before end date")
Hope it helps !
It worked perfectly ! Thanks a million
I am using the tablet mode by the way.
Hi @gabibalaban
When we are sending a leave request from one time zone to another time zone manager. the date that we apply are getting changed.
Ex : Philippines Employee selected 28-29 November leave and the manager in USA will see as 27-28 November. So this is happening with other timezones as well.
please help how we can sort this out.