Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
179
rated 0 times [  181] [ 2]  / answers: 1 / hits: 6854  / 9 Years ago, fri, september 4, 2015, 12:00:00

I'm working with a programm in which some settings shall be imported by values set in an Pdf-form that is editable. Adobe Acrobat DC Pro is the program I use for creation of the Pdf-form. Problem is it just has controls like TextBox, ComboBox etc. but no DatePicker.



After I searched the internet I found the guys from Acroform and they have a Javascript that enables the use of a DatePicker inside of a Pdf-form. I downloaded their code from here and had no problem to get it running but the DatePicker starts with Sunday. I guess that is due to the fact that the Date Enumeration starts with 0 = Sunday, 1 = Monday etc. but I would like the change the DatePicker to start with Monday(the way Windows displays a DatePicker), problem is I have no experience in Javascript. I thought that if I just change all the Arrays of Days in the code to Sunday being at the end instead of the start would work but this just makes the dates for Monday-Saturday to be empty and then it starts with Sunday and paints on to the right where no Day-captions are anymore. Because I habe no experience in Javascript I cannot find out which code is responsible for this behaviour.



My questions are:



1) Does anyone have had a similar problem with a DatePicker in Javascript and found a solution he/she could share ?



2) Does anyone know a different Javascript DatePicker Example that can be used without having to buy it ?



The code has roughly 1200 lines of code so I will not post it here but it can be downloaded here.


More From » pdf

 Answers
15

Why not saying that you are talking of the FormRouter date picker (I guess they fixed the missing August 31 in the meantime). But then, you get what you pay…



Anyway, it is possible to create a date picker using the Dialog Object in Acrobat JavaScript. This then allows to freely configure the date picker whether to follow ISO standards (beginning the week with Monday), or USAn use (beginning the week with Sunday). It is essentially using the capabilities of the Date Object in JavaScript.



That date picker is available as developer toolkit. But not for free; creating smart and complex PDF applications is my business, and there is quite a bit of work behind that datepicker (however, if the datepicker is part of a project, it is not billed separately…). Feel free to contact me in private for further information an pricing (several customers told me that pricing is reasonable).



Anyway, studying the Date Object, understanding arrays, and grasp some knowledge about the Dialog Object would get you in the shape to create your own version.



The trick with the beginning of the week is indeed the enumeration of the day of the week. Add an offset, and you can set it to any day…



In short the answer to question 1: Yes; problem solvable and solved; to question 2: Yes, but No.


[#34416] Thursday, September 3, 2015, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
destiniemartinac

Total Points: 92
Total Questions: 106
Total Answers: 111

Location: Cyprus
Member since Mon, Oct 24, 2022
2 Years ago
;