3 Replies Latest reply on Jun 24, 2012 8:49 PM by enomail

    Auto-Filling Dates on a Blank Calendar

    HiFiBlaster

      Hello All,

       

          I have a blank calendar with each day block having a form for the numeric day.  I am trying to have the blocks auto-fill so that when the user enters day "1" the remaining days will auto-fill there respective number.  I have already figured out the "+1" script I need to link them;

       

      event.value = ( getField("Day_1_Date").value)+1

       

      However, I assume I need an "IF/THEN" statement so the prior unused blocks preceeding day "1" will be blank.  If anyone has a better suggestion or can help me out with the latter I would appreciate it.  Thanks in advance!

        • 1. Re: Auto-Filling Dates on a Blank Calendar
          gkaiseril MVP & Adobe Community Professional

          Does this really work?

           

          How do you know when you get to the end of the month?

           

          How do you match the date to the day of the week?

          • 2. Re: Auto-Filling Dates on a Blank Calendar
            HiFiBlaster Level 1

            A couple of clarification points.

             

            1) It's a single month calendar with 6 rows for weeks (allowing for any months that start on a Friday or Saturday. 

            2) Each form for the numeric date is labeled "Day_x_Date" (x= the block number 1-42)

             

            I have it now that if I put in the first day in block #1, all of the remaining fields are daisy chained using the above java script (#2 looks to #1, #3 looks to#2, etc).  What I want is for the user to be able to enter the first day (wherever it may fall) then the rest of the fields would auto-fill.  To end it on the right date,  I assume an "If/Then" with a range up to the end date would work.

             

               I also have a block to fill the month in.  It might work to link the end date to the month. For example if May is entered the statement would allow up to 31 but if June were entered it would only go up to 30.  I am still very new to javascript and I'm a little (a lot) over my head with this one.  New territory from just making forms on a PDF.

            • 3. Re: Auto-Filling Dates on a Blank Calendar
              enomail Level 1

              Hi HiFiBlaster

               

              What is the use of this calendar once it is filled out?

              I have a similar PDF set up similar to that as a template that can be used to create a monthly calendar but you have to tab to each date field.

               

              Ron A