I have a powerapps form to submit requests for processing where the submitter can select a date. The default Date picker control is limited as I want to include a criteria for when a date is available for selection so I am replacing the date picker control with the Calendar Screen template in PowerApps.
In the Calendar Screen template, I have added a Vertical Gallery (Gallery4) to the MonthDayGallery. Gallery4 items is a filter on a SharePoint list that populates calendar dates where the Start Date and End date have a date value. Purpose is to identify that's are not available for selection.
Filter(
BlockDays,
DateAdd(
_firstDayInView,
ThisItem.Value,
TimeUnit.Days
) >= StartDate && DateAdd(
_firstDayInView,
ThisItem.Value,
TimeUnit.Days
) <= EndDate
)
How can I disable the selection or add a validationt to a button to check the dateselected to filter in the list to see if those dates are not available for selection throw an error or prevent user from selecting the date.
