You don’t need to do any complex work to achieve this.
Just use an online database where you can store the time and whenever user opens the app then check the stored time and current time if it is competing your required time frame then set the button as clickable else set it as disabled.