You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Bharat Bhatt <bh...@gmail.com> on 2017/01/18 10:36:15 UTC

Re: Date component in PDF along with Time

I want to display the time along with date in Date picker.
I tried with "m/d/yy h:MM tt" format in
   AFDate_Format("m/d/yy h:MM tt")
   AFDate_KeystrokeEx("m/d/yy h:MM tt");

and also with AFTime_FormatEx("m/d/yy h:MM tt");
                    AFTime_KeystrokeEX("m/d/yy h:MM tt")
But only formatting in working. Time is not displayed in date picker.

Is there any way I can get time in date picker.

Thanks,
Bharat

On Wed, Jan 18, 2017 at 11:09 AM, Bharat Bhatt <bh...@gmail.com>
wrote:

> Thanks a lot. I tried this solution and its working fine for me.
>
> Thanks,
> Bharat
>
> On Tue, Jan 17, 2017 at 10:37 PM, Tilman Hausherr <TH...@t-online.de>
> wrote:
>
>> Am 17.01.2017 um 17:40 schrieb Karl Heinz Kremer:
>>
>>> The latest update to Adobe Acrobat and Adobe Reader DC does now finally
>>> support a data picker. The way this works is that you create a normal
>>> date
>>> field - meaning a text field with a date format applied - and when such a
>>> field is displayed in the latest version of Acrobat/Reader, a date picker
>>> is shown. See here for more information:
>>> http://khkonsulting.com/2017/01/new-form-field-types-in-acro
>>> bat-dc-image-field-and-date-picker/
>>>
>>> This means all you need to do is mimic what a date field created in
>>> Acrobat
>>> looks like. You would do that by creating one, and then analyzing what
>>> the
>>> field format and validation options look like (e.g. using the PDFBox
>>> Debugger). If you need a sample, you can download one from here:
>>> http://khkonsulting.com/files/AUC/date_image_field.pdf
>>>
>>
>> Yeah, it's really just a text field. Plus two AA entries (F and K) that
>> call this:
>> AFDate_FormatEx("m/d/yy");
>> AFDate_KeystrokeEx("m/d/yy");
>>
>> Tilman
>>
>>
>>
>>> There are other date pickers, which are implemented as JavaScript in the
>>> PDF form. If you want to implement something like that, you would have to
>>> get such a date picker, apply it to a document, and then again reverse
>>> engineer how this information is stored inside the field object.
>>>
>>>
>>> Karl Heinz Kremer
>>> PDF Acrobatics Without a Net
>>> PDF Software Development, Training and More...
>>>
>>> khk@khk.net
>>> http://www.khkonsulting.com
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>
>>
>

Re: Date component in PDF along with Time

Posted by Karl Heinz Kremer <kh...@khk.net>.
That is something you have to ask Adobe- they have implemented the date picker in their applications. There is nothing new in the PDF documents, it's all done in the new versions of the applications. 

Karl Heinz Kremer
PDF Acrobatics Without a Net 
PDF Software Development, Training and More... 
http://www.khkonsulting.com 

> On Jan 18, 2017, at 5:36 AM, Bharat Bhatt <bh...@gmail.com> wrote:
> 
> I want to display the time along with date in Date picker.
> I tried with "m/d/yy h:MM tt" format in
>   AFDate_Format("m/d/yy h:MM tt")
>   AFDate_KeystrokeEx("m/d/yy h:MM tt");
> 
> and also with AFTime_FormatEx("m/d/yy h:MM tt");
>                    AFTime_KeystrokeEX("m/d/yy h:MM tt")
> But only formatting in working. Time is not displayed in date picker.
> 
> Is there any way I can get time in date picker.
> 
> Thanks,
> Bharat

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: Date component in PDF along with Time

Posted by Tilman Hausherr <TH...@t-online.de>.
Have a look here and search:
http://help.adobe.com/livedocs/acrobat_sdk/10/Acrobat10_HTMLHelp/wwhelp/wwhimpl/js/html/wwhelp.htm?href=JS_Dev_Overview.71.1.html&accessible=true

if there isn't, you'll have to write something yourself in javascript.

Tilman


Am 18.01.2017 um 11:36 schrieb Bharat Bhatt:
> I want to display the time along with date in Date picker.
> I tried with "m/d/yy h:MM tt" format in
>     AFDate_Format("m/d/yy h:MM tt")
>     AFDate_KeystrokeEx("m/d/yy h:MM tt");
>
> and also with AFTime_FormatEx("m/d/yy h:MM tt");
>                      AFTime_KeystrokeEX("m/d/yy h:MM tt")
> But only formatting in working. Time is not displayed in date picker.
>
> Is there any way I can get time in date picker.
>
> Thanks,
> Bharat
>
> On Wed, Jan 18, 2017 at 11:09 AM, Bharat Bhatt <bh...@gmail.com>
> wrote:
>
>> Thanks a lot. I tried this solution and its working fine for me.
>>
>> Thanks,
>> Bharat
>>
>> On Tue, Jan 17, 2017 at 10:37 PM, Tilman Hausherr <TH...@t-online.de>
>> wrote:
>>
>>> Am 17.01.2017 um 17:40 schrieb Karl Heinz Kremer:
>>>
>>>> The latest update to Adobe Acrobat and Adobe Reader DC does now finally
>>>> support a data picker. The way this works is that you create a normal
>>>> date
>>>> field - meaning a text field with a date format applied - and when such a
>>>> field is displayed in the latest version of Acrobat/Reader, a date picker
>>>> is shown. See here for more information:
>>>> http://khkonsulting.com/2017/01/new-form-field-types-in-acro
>>>> bat-dc-image-field-and-date-picker/
>>>>
>>>> This means all you need to do is mimic what a date field created in
>>>> Acrobat
>>>> looks like. You would do that by creating one, and then analyzing what
>>>> the
>>>> field format and validation options look like (e.g. using the PDFBox
>>>> Debugger). If you need a sample, you can download one from here:
>>>> http://khkonsulting.com/files/AUC/date_image_field.pdf
>>>>
>>> Yeah, it's really just a text field. Plus two AA entries (F and K) that
>>> call this:
>>> AFDate_FormatEx("m/d/yy");
>>> AFDate_KeystrokeEx("m/d/yy");
>>>
>>> Tilman
>>>
>>>
>>>
>>>> There are other date pickers, which are implemented as JavaScript in the
>>>> PDF form. If you want to implement something like that, you would have to
>>>> get such a date picker, apply it to a document, and then again reverse
>>>> engineer how this information is stored inside the field object.
>>>>
>>>>
>>>> Karl Heinz Kremer
>>>> PDF Acrobatics Without a Net
>>>> PDF Software Development, Training and More...
>>>>
>>>> khk@khk.net
>>>> http://www.khkonsulting.com
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>>
>>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org