Dates before 1900?

Avatar

08-08-2008

I've created a form on which I need to allow users to enter dates before 1/1/1900. LiveCycle uses 1 Jan 1900 as its starting, or epoch date, so any date before that is considered to be invalid. I can avoid that problem by simply not supplying a validation pattern, but I also need to reformat the date to a specific format for display, which LiveCycle will not do because the date is invalid.



I'm just wondering if anyone has dealt with this before? I assume that I can use a text field instead and do all of the date validation and reformatting myself, but that seems like a lot or work.

Replies

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

11-08-2008

Are you refering to the calendar or the actual field itself. I was able to enter in a date like 10/10/1867 with an issue. Using the calendar on the other hand I was able to select the date but it never diaplyed in the field.

Avatar

11-08-2008

I'm referring to a datetime field. You can enter anything, but if LiveCycle doesn't consider it to be valid, it won't use the display format for it. For example, I have a display format of d-mmm-yyyy. For dates after 1/1/1900, they are displayed correctly. Dates before 1/1/1900 are left as entered.

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

11-08-2008

Just checked on it and you are correct. There is a limitation of Jan 1, 1900. I suggest that you do not use a dat/time field but a standard text field and treat it as a string.

Avatar

11-08-2008

Thanks for verifying my original statement. What I was looking for was perhaps someone who had already implemented a text-based solution.



My problem is that the users will enter the date as m/d/yyyy, but I have to format it as d-mmm-yyyy for display and printing, as well as validate it (at least as to valid month number and day within the month and year within a specific range). To do this with a text field will require considerable scripting, especially since the date will need to be set back to m/d/yyyy format if the user edits it. My field is also tied to a field in an XML file, but I don't believe that will cause any significant problems.



I will tackle the problems with using a text field and post any re-usable scripts that I come up.