Copy link to clipboard
Copied
I am working on a fillable form, and I want users to enter dates from one period to the next. Specifically from Sunday to Saturday of any week. How can I do that?
Working with Date objects in Acrobat JavaScript is not a trivial task. See these tutorials:
https://acrobatusers.com/tutorials/working-with-date-and-time-in-acrobat-javascript
https://acrobatusers.com/tutorials/working-with-date-and-time-in-acrobat-javascript-part-2
https://acrobatusers.com/tutorials/working-date-and-time-acrobat-javascript-part-3-3
If you're interested, I've created a (paid-for) tool that will allow you to set up the calculated dates very easily, without having to write any c
...Copy link to clipboard
Copied
You can have them fill in just the first day (Sunday), verify it really is a Sunday, and if so, populate the other dates using a script.
Copy link to clipboard
Copied
Thanks for the reply. The thing is I'm new to adobe. Can you guide me how to do that?
Copy link to clipboard
Copied
Working with Date objects in Acrobat JavaScript is not a trivial task. See these tutorials:
https://acrobatusers.com/tutorials/working-with-date-and-time-in-acrobat-javascript
https://acrobatusers.com/tutorials/working-with-date-and-time-in-acrobat-javascript-part-2
https://acrobatusers.com/tutorials/working-date-and-time-acrobat-javascript-part-3-3
If you're interested, I've created a (paid-for) tool that will allow you to set up the calculated dates very easily, without having to write any code. You can find it here: https://www.try67.com/tool/acrobat-apply-automatic-date-calculation
And if you contact me privately I could help you with the first part (validating that the user enters a date that falls on Sunday).