I want to set the button to be able to click only at a particular time of the day. How can I do that?
All buttons have a “Disable If” feature where you can add a formula to disable the button. Something like this might work for you if you only wanted the button available for a particular hour of the day…
This formula will show the button as enabled for the 7:00am to 7:59am hour everyday.
Disable If
Now().Hour() < 7 OR Now().Hour() > 7
Thanks a lot @benblee. Really appreciate your help.
Although now I face another problem. The current time is set as Los Angeles time, however I am in India right now.
Is there a way to change that?
Time Zones add a little bit to the equation, but it’s not too bad. I prefer to create a Timezones table so the solution is more flexible. I use a three part system that helps simplify anything I need to do afterwards with time.
- Timezones table that contains the adjustments for each timezone I’ll need to use.
- MyTimezone canvas variable that is a dropdown of all the timezone options from the Timezones table.
- CurrentTime canvas variable that reads in the current time and adjusts it to the chosen timezone from MyTimezone.
I added this set up to the Playground Doc - A Collection of Tips, Tricks, and Examples that you can copy. There are some other fun Coda tricks in that document as well.