Planet PDF Forum Planet PDF Forum
  New Posts New Posts RSS Feed - Can a field value be changed based upon date RANGE
  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.

Can a field value be changed based upon date RANGE

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


Joined: 21 Feb 2014
Points: 16
Post Options Post Options   Quote bdavis Quote  Post ReplyReply Direct Link To This Post Topic: Can a field value be changed based upon date RANGE
    Posted: 20 Nov 2014 at 8:34pm
Hello everyone,

I've created a form, but recently have been asked to add a feature that is above my skill level (which is high enough to cobble together pieces of code I find, and after trial and error, make things work.)

With that being said, I've incorporated the calendar found on http://www.pdfscripting.com/public/FreeStuff/PDFSamples/JSPopupCalendar.pdf

(I've used the "Simple Date Format 1", which exports the value as mm/dd/yyyy, in a field called "DateTest1")

I'd like to change the value of another field (named "Pay_Period") based on a RANGE of dates entered into "DateTest1".

Example: If any date between 01/01/2015 and 01/15/2015, I'd like Pay_Period to go to a value of 24, and if the date is 01/16/2015, I'd like Pay_Period to go to a value of 23.

(I'm at least skilled enough, where if I get how to code those 2 lines, I can figure it out for the rest of the year.)

As this forum is quite helpful, I'll say thanks in advance.

Much appreciated.
Back to Top
Sponsored Links


Back to Top
gkaiseril View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Location: USA
Points: 4106
Post Options Post Options   Quote gkaiseril Quote  Post ReplyReply Direct Link To This Post Posted: 21 Nov 2014 at 5:03pm
Have you looked at the tutorials about date calculations at PDF Scripting?
 
You need to change all your date strings to a JavaScript date object and then compare the millisecond value for each date object.
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.047 seconds.