Having a Brain Fart: How to Set a Static List of Dates in a Custom State on Page Load?

Hey everyone, I’m trying to set the minimum date for an Air Date Picker using a custom state that holds a List of Dates.

I set up the custom state and tried to populate it with [Current date/time + days 1], but I can’t remember how to properly turn a single date into a list. The state is set to List of Dates, so I keep getting an error. Any tips? Thanks!

You can just Add the date to the list, but setting the state value to its current value: plus item: current date/time.

I was just testing the same technique that @adamhholmes described, but I couldn’t access the + days operator at the end of the expression. I was able to get it to work by first creating the expression with an operator different than :plus item (I used merged with), and then afterward revising the placeholder operator to the desired :plus item’.

Thanks guys that worked. I codlin’t remember how I did on a different app a few years back.

This topic was automatically closed after 70 days. New replies are no longer allowed.