Page 1 of 1

Setting Date Format with Javascript

Posted: Mon Jun 19, 2017 3:06 am
by prime clinical systems
Hi, Since I could not figure out how to handle date in sdk, I found that with Javascript I can get the Category of Date, and the Format string to show, but I cannot make the dropdown for the field become visible.
FN = "Text1" for example
JS = "var f = this.getField(""" & FN & """); f.setAction(""Format"",""AFDate_FormatEx(\""mm/dd/yyyy\"");"");"
Call Me.PDF.Inst.ExecuteJS(Me.PDF.Doc, JS, PAEC_Field, PAESC_Exec, Nothing, Result)
JS = "var f = this.getField(""" & FN & """); f.setAction(""Keystroke"",""AFDate_KeystrokeEx(\""mm/dd/yyyy\"");"");"
Call Me.PDF.Inst.ExecuteJS(Me.PDF.Doc, JS, PAEC_Field, PAESC_Exec, Nothing, Result)
Dim FField As IPXC_FormField
Set FField = Me.PDF.Doc.CoreDoc.AcroForm.GetFieldByName(FN)
FField.Flags = TFF_Date
Call Me.PDF.Doc.FireFieldChangedEvent(FField)
the formatting works, but no dropdown shows, any solution for that?
ce

Re: Setting Date Format with Javascript

Posted: Mon Jun 19, 2017 8:17 am
by Sasha - Tracker Dev Team
Hello Clifford,

Just spoke with our lead dev. - he said that this can be done only with JS and that this is a bug on our side that drop-down is not shown and he will try to fix this until the next release.

Cheers,
Alex

Re: Setting Date Format with Javascript

Posted: Mon Jun 19, 2017 4:25 pm
by prime clinical systems
Ok thanks
ce

Re: Setting Date Format with Javascript

Posted: Mon Jun 19, 2017 6:47 pm
by Sasha - Tracker Dev Team
:)

Re: Setting Date Format with Javascript

Posted: Fri Jul 07, 2017 11:53 pm
by prime clinical systems
Hi was this fixed in the 322.5 release of Jun 29?
ce

Re: Setting Date Format with Javascript

Posted: Mon Jul 10, 2017 9:54 am
by Tracker Supp-Stefan
Hello Clifford,

Sasha told me that this is planned for build 323, as far as he is aware.

Cheers,
Stefan