PDF-XChange - Tracker PDF Viewer - TIFF-XChange - Image-XChange - XMF-XChange - Raster-XChange - Support

Moderators: Tracker Support, Paul - Tracker Supp, Chris - Tracker Supp, Vasyl-Tracker Dev Team, Ivan - Tracker Software, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
 
prime clinical systems
User
Topic Author
Posts: 154
Joined: Sun Aug 05, 2012 5:20 pm

Setting Date Format with Javascript

Mon Jun 19, 2017 3:06 am

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
 
User avatar
Sasha - Tracker Dev Team
User
Posts: 2104
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Setting Date Format with Javascript

Mon Jun 19, 2017 8:17 am

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
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
 
prime clinical systems
User
Topic Author
Posts: 154
Joined: Sun Aug 05, 2012 5:20 pm

Re: Setting Date Format with Javascript

Mon Jun 19, 2017 4:25 pm

Ok thanks
ce
 
User avatar
Sasha - Tracker Dev Team
User
Posts: 2104
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Setting Date Format with Javascript

Mon Jun 19, 2017 6:47 pm

:)
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

Who is online

Users browsing this forum: No registered users and 1 guest