The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group
How to add days to a date?
Hi all.
My question I imagine must be very simple to solve.
I want to publish a date and then the same date but with an additional 10 days in date format.
Example:
Date field = [Date] = [33]
New Date = [33] + 10 days.
I have tried all the ways to publish the New Date in a View and I do not know how to do it.
I would greatly appreciate your help
December 19, 2018 at 1:03 pm
Because you are working with a date object, it isn't all that easy. You'll have to work on a coded method most likely.
December 20, 2018 at 6:02 am
Here's a jQuery function that should be able to get you started. It takes a date field and adds 10 days.
Right now, it writes the new date to a string. You'll have to figure how to access your fields and write the new date back to the appropriate field.
When you've finished modifying the code for your purposes, add it to the after fields section on the form's customize HTML page.
Attachment:
date-plus-10.js_.zip
December 26, 2018 at 6:34 am
Victor, thank you very much for your help. I have also watched your videos and they have helped me a lot. Thanks again.
Discussion closed.