Is there a way to blacklist dates on the date...

Is there a way to blacklist dates on the date-selector?

I would like to automatically disable the possibility of entering any day that is in a weekend, or is a national holiday (in Denmark).

I could potentially make a list of dates that are not accepted, and cross reference with that, but would that remove the date from the selector, or just make an error when the user tries to sync?

1 5 748
5 REPLIES 5

Unfortunately, we do not control the date selector โ€” it is a default input component from your device/browser. Best you can do is to put in a Valid_If constraint that checks if the input date is valid

@praveen Thanks! How do I set up a Valid_If constraint to check against my blacklist?

Hi @Frederik, I tried this. i put the expression

NOT(

IN(Entry Date], Dates[Lookup Date])) in the Valid_If constraints attribute of the [Entry Date] column. The [Entry Date] is the data entry date column that user wishes to set.

Dates is the lookup table containing lookup dates that the app builder wishes to

prevent the user from entering. [Lookup Date] is the column of lookup dates or barred dates in the Dates table.

The user can see and enter the barred dates from the dates selector but the column constraint will disallow the form to be saved and will throw an error message. You can modify that error message per your needsโ€ฆ

Not sure if this helps you. But just thought of sharing.

Hi @praveen Sorry that I saw your post after I posted my post that I was typing in.

@Suvrutt_Gurjar Worked perfectly for me, thank you!

Top Labels in this Space