JavaScript Coding help required please - Time based - Numeric Keypad
Copy link to clipboard
Copied
Hello,
I would truly appreciate it if someone can assist or create JavaScript code for my green project.
Time based as mentioned before, would require a numeric keypad numbered from 1-9, when i click on a button I'll be able to enter the time manually (HH:MM), via the numeric keypad. I'm not 100% sure if this is possible as I would be using PDF Expert to execute my smart forms.
Basically, I work on a ship and everybody uses so incredibly much paper everyday, over 150 pages a day to just print, scan and upload then chuck the paper again. Was hoping to be able to make a smart pdf, that fulfills everyones needs. Managing okay so far however need to know if I can use a numeric keypad for entering time manually for incase the bridge officers managed to miss a time and go back to fill in the time manually afterwards.
Thing is, I'm aware that I can use the normal keyboard however with 40 checkpoint on a normal checklist, this becomes a bit troublesome and a numeric keypad would be ideal. Only thing I'm scared of is I think it might not depend on the code of the JavaScript, but more on PDF Expert's ability to show a numeric keypad?
Alternative, a 'page like layout' with hours 0000 - 2300 on the top line and minutes 01-59 in the second line. That would suffice too. or something similar to nogray.com 's time picker..
Any assistance &/or pointing me in the correct direction would be greatly appreciated.
Thanks so much,
*Using Adobe Acrobat DC Pro
Copy link to clipboard
Copied
I would look at writing custom keystroke, format, and validation scripts using the RegExp to describe the various acceptable input formats for the time. This would be along the lines of the civilian 24 hour time format except one would accept either the ":", ".", or space. One could change the "." or space to the ":' in the keystroke script or use the calculation script.
Unfortunately most mobile device apps do not support date and time formatting and do not support document level scripts. You would need to do a lot of testing to see how PDF Expert works.
Copy link to clipboard
Copied
Hi gkaiseril,
Many thanks for your response,
Your assistance is truly appreciated ! 24 hr time format would be preferred as confusion may step in if we use AM/PM.
The separation of hours and minutes isn't an issue however with the other gents also being Navigators, the ":" would be preferred however this doesn't matter in the grand scheme of things to be honest. As long as we can get it to become a green working environment and save wasting such ridiculous amounts of paper the battle will be won regardless.
Not too sure what the calculation script is or how to change the separation indicator, but I'll get to it once we get there 🙂
Thanks again for your kind assistance and looking forward to your response.

