I have built a shop. People can choose a pickup date. But shouldn’t be able to pick a data less than 5 dates from now. How would you only give them the option to pick a day 5+ days from now?
5 days or 5 business days?
5 days is fine, shop is open 7 days a week!
I think the best you could do with the date picker is to show something like a hint component if the date is out of range.
To add 5 days to todays date you could use a math column… Now+5… or (order created on date+5)
If you’re using a custom form you could also restrict the submit button.
Thanks! I’m going to try!
Whichever way you go with this, you will need a Custom Form. Otherwise it’s impossible to compare the selected date to any other date until after the form is submitted.
Ah good to know!
But is it possible to only filter dates that are NOW+5 or more?If so how? Thanks in advance!
No you can’t filter dates in a date picker. Best you can do run edit checks after a date has been selected to determine if it’s in range or not.
Thank you!
- Create a Math column using
Now+5
. That will give you the date 5 days from now. - In your Custom Form, you’ll be collecting a date from the user in a User Specific Column
- Create an if-then-else column:
– If user selected date is on or after math column (now+5), then true - Now you can use that if-then-else column as a condition on your Submit button. ie. don’t allow the action unless the if-then-else is checked.
- You could also add a hint component to your form to warn when they have selected an “invalid” date, and use the same if-then-else column as a visibility condition on the hint.
Thanks a lot Darren!
An alternative approach might be to limit the dates that they can pick up. In most cases people will want to pick up on a certain day of the week rather than a particular date. So you could build up a list of dates from a date 5 days after they place their order. Something like 14 days worth would capture most peoples preference… a final “choice” could say “After xx date” where xx date is the 14th date.
This would then be presented as a simple drop down or choice list.
The benefit of this approach is you will not be holding the order for a pick up long into the future. And can avoid a user accidentally choosing the wrong date. From a store point of view, you don’t want to be managing to many orders awaiting pick up either.
I wouldn’t use a date picker for this. I’d use a choice component instead.
So say I want people to choose from X days after NOW+5, how would you do that Robert?
How would generate the dates and how limit the choices?
Thanks!
Use a Helper Table
- Add as many rows as you need (the number of dates you want to make available)
- Number your rows, from 0 to N
- Add a math column using the formula
Now+5+N
, where N is the row number - Use that in your Choice component
Thanks to you I use a helper table for everything!
I am going to try this and will get there in the end