3 Replies Latest reply on Apr 24, 2017 8:07 AM by SGrohola

    Error message with month custom code "mmmm" - using Adobe Acrobat Pro

    SGrohola

      I have set up a form, and I have used javascript in other pdf forms for the date field, with no problem. 

       

      In this pdf form, the date is broken out as " of the ___ day of _(Month)__, 20 __.  I set up a custom date format for each field.

       

      Day - custom format "dd"

      Month - custom format "mmmm"

      Year - custom format "yy"

       

      On the Page Properties Actions, I have set up to "Run a JavaScript":

      [code]

      var f=this.getField("Day");

      f.value=util.printd("dd", new Date());

      var g=this.getField("Month");

      g.value=util.printd("mmmm", new Date());

      var h=this.getField("Year"); h.value=util.printd("yyyy", new date());

      [/code]

       

      I keep getting an error message though "Invalid date/time: please ensure that the date/time exists.  Field [Month] should match format mmmm"

       

      I'm not sure why I keep getting the error message.  Can anyone help?