20

I am replicating a fillable/savable form from LiveCycle with LaTeX using \CheckBox and \TextField items. I would also like to replicate the pop-up calendar / datepicker feature. I am aware of the insDLJS package which sounds like I could program one in JS, but does anyone know of a simpler method?

Benjamin
  • 496
  • 3
  • 13
  • 1
    Can you provide an MWE of related functionality? I'm not familiar with a lot of the stuff you're talking about. – Sean Allred Jun 13 '15 at 16:21
  • The forms are generated using the hyperref package. The date picker is essentially a text field which when clicked opens a calendar / date picker; the selection is then entered as a formatted date in the text box. I am asking whether I need to learn JS to program one through insDLJS or if there are alternatives? – Benjamin Jun 15 '15 at 16:41
  • I understand what the final result is; I do not understand how to get it (text boxes, check boxes, etc.) up and going. I've never had the need to create such a PDF. Please provide a MWE. – Sean Allred Jun 15 '15 at 17:13
  • ... maybe a look at the package will help ... datepicker-pro on CTAN –  Jan 13 '19 at 21:13
  • That's good, though there was a fair amount of lag for me... using the date pickers in the manual. – Benjamin Jan 14 '19 at 23:45
  • 1
    From Ctan: This package has become obsolete as of December 2020. Since December 2020, Adobe no longer supports Flash player – NBur Jan 16 '23 at 09:28
  • Even with Adobe support it was broken by design to rely on Flash player, imho. – gildux Jan 16 '23 at 21:33

1 Answers1

5

As mentioned in https://tex.stackexchange.com/a/488757/2388 there is an inbuilt date picker in recent adobe reader. The answer show how to use it with hyperref, so here as an alternative the code for l3pdffield-testphase. Notice that the javascript need an additional parentheses pair.

\DocumentMetadata{}
\documentclass[12pt]{article}
\usepackage{l3pdffield-testphase}

\begin{document} Pick up a date: \ExplSyntaxOn \pdffield_textfield:n { name =mydate, format ={(AFDate_FormatEx("dd.mm.yyyy");)}, keystroke ={(AFDate_KeystrokeEx("dd.mm.yyyy");)} } \ExplSyntaxOff

\end{document}

enter image description here

Ulrike Fischer
  • 327,261