2 Replies Latest reply on Feb 10, 2013 7:33 AM by Gaguilar2099a

    Need refresher on date+1


      I know this is an easy on, so I thought, need the simple script to add 1 day to a second date field. I have datefield with 2/12/13 need datefield2 to calc/add 1 day: to = 2/13/13. I have tried what I had and couple that were posted here but nothing happens in the second date field. Thanks

        • 1. Re: Need refresher on date+1
          George_Johnson MVP & Adobe Community Professional

          There are several ways to do this. One way is to use a custom Validate script in the first text field, something like:


          //Custom Validate script

          (function () {


              // Clear other field if field is blank

              if (!event.value) {

                  getField("datefield2").value = "";




              // Convert value to a date object

              var d = util.scand("mm/dd/yyyy", event.value);


              // Add one day

              d.setDate(d.getDate() + 1);


              // Set the value of the other date field

              getField("datefield2").value = util.printd("mm/dd/yyyy", d);



          • 2. Re: Need refresher on date+1
            Gaguilar2099a Level 1

            Thank You! I see where I was messsing up and learned a couple of other things as well! Thanks again!