Copy link to clipboard
Copied
I'm creating a new form based on an old webpage that had this feature. I'm hoping to get the "Date" Fields next to each day of the week to populate correctly no matter what day of the week a user inputs into the "Week Of" field. I've tried to adapt code I found in a handul of other posts with people making time sheets and such...but I just can't wrap my mind around Javascript enough to get it to work the way I need it. Any help or guidance would be much appreciated!
Copy link to clipboard
Copied
So the first thing you need to do is rename the date and other fields so they can be used by a script. I would suggest naming them for the day of the week number, as defined by the Date.getDay() function, "DateDay0", "DateDay1", etc. Then you can use the "day" value from the "Week Of" field, to find the correct starting place for incremeting the dates.