Javascript auto fill in date fields from reference field
I have a expense form that lists each day of the week. The form has a main date field that the user selects the Saturday date from a drop down calendar. I would like to have the individual days to have the date autofill. Does anyone know the Javascript that will calculate a date from an existing field.
Example If Main Date Field is entered 6/5/2021 (always a Saturday Date), I would like the previous days date to autofill. Sunday Date field would auto fill with the date 5/30/2021, Monday Date field 5/31/2021, etc for each day of the week through Saturday showing 6/5/2021. Is this possible?
Thanks in advance.
