Planet PDF Forum Planet PDF Forum
  New Posts New Posts RSS Feed - Auto populate the month of Feb.
  FAQ FAQ  Forum Search   Register Register  Login Login


Hi, welcome to the Foxit Planet PDF Forum. If you have PDF or Adobe Acrobat questions then the right place to ask them is here, in this forum.

Auto populate the month of Feb.

 Post Reply Post Reply
Author
Brianwh View Drop Down
New Member
New Member


Joined: 10 Feb 2017
Points: 5
Post Options Post Options   Quote Brianwh Quote  Post ReplyReply Direct Link To This Post Topic: Auto populate the month of Feb.
    Posted: 10 Feb 2017 at 9:21pm
Hello All,

I have read a number of posts on several sites. Additionally have noted a number of knowledgeable folks supporting all the of the newb questions. I have visited some resource sites like adobe. and various forums like this one.
However I am still not able to glean the solution for the correct java script that will address correctly auto populating the  Month of February if 1.29 thru 1.31 is selected in the initial date field.
all other dating works correctly
Form has 3 date fields, I am trying to provide script that will allow my users to populate the first field and the 2nd and 3rd field will be dated 1 month later , naturally Feb. is an exception
the main script I have used to this point is
 // get value of field to update - field name is Text5
var sDate = this.getField('Text5').value;
// convert to date time object
// the fields format is mm/dd/yyyy
var oDate = util.scand('mm/dd/yyyy', sDate);
// get the parts of the date
var fFullYear = oDate.getFullYear(); // 4 digit year
var fMonth = oDate.getMonth(); // zero based month
var fDate = oDate.getDate(); // date of month
// increment the month
fMonth++;
// create new date time object
var oNewDate = new Date(fFullYear, fMonth, fDate);
// set field value - field has no format
// formatting is applied by the printd method
event.value = util.printd('mm/dd/yyyy', oNewDate);
I have tried a couple others that I could share if needed, however the result of those scripts is the same...I can share the other variations of java scripts used in further posts.
 
Any assistance in creating the additional scripting needed would be Greatly appreciated.
Ps I have tried tweaking this with formula for adding or subtracting days but alas not doing it correctly.
Again Thank you in advance
Brian
 
 
Back to Top
Sponsored Links


Back to Top
Brianwh View Drop Down
New Member
New Member


Joined: 10 Feb 2017
Points: 5
Post Options Post Options   Quote Brianwh Quote  Post ReplyReply Direct Link To This Post Posted: 13 Feb 2017 at 5:59pm
Should I have posted my question in another area ??
thanks
Brian
Back to Top
Merlin View Drop Down
New Member
New Member
Avatar

Joined: 03 Jun 2012
Location: 43.95 N / 4.82
Points: 38
Post Options Post Options   Quote Merlin Quote  Post ReplyReply Direct Link To This Post Posted: 14 Feb 2017 at 12:24pm
Answered here: http://forums.planetpdf.com/auto-populating-date-field-feb-is-an-issue_topic2131.html
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.10
Copyright ©2001-2017 Web Wiz Ltd.

This page was generated in 0.031 seconds.