12
Views
4
Comments
Solved
Disable form based on date

Hello,

I have a form that allows users to enter their savings. However, I would like for them to only be able to enter their savings from the 1st to 10th of every new month. May I know the steps needed to achieve this? Thank you!

2024-12-19 07-54-27
Aditya Chinchole
Solution

Hi,

For this, use the Built-in functions like Month() and Adddays , CurrDate().

So you will have to 1st check the current date whether it's in between 1st to 10th day , you can get the day from currdate.

UserImage.jpg
Low Nico

Hello,

Thank you for your suggestion! May I ask, is there a way for me to check if I did it correctly or not? Is there a way for me to simulate the date to be between 1st to 10th day and then 11th day onwards to check if the conditions I set is correct? Thank you!

2024-12-19 07-54-27
Aditya Chinchole

Hi,

Yes just for temporary check of your logic, you can set a dummy date instead of currdate().

Like say you have to use 11th Feb 2023, set this date in a variable or simply hardcode it for testing purpose.

UserImage.jpg
Low Nico

Hello,

Thank you for your help! I appreciate it!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.