Answered
Using LiveCycle Designer 8. Radzmar provided me with the time pattern and display options which worked out well for time formats of "HH:MM" when using "H:MM" or "HH" or "HH.MM". However, if a user enters "623" without the ":" or just "6" ("HMM" or "H"), the value doesn't not correct itself (or at least respond by entering null into the field) and my script is still able to calculate the time difference (but of course wrong). The 'formattedValue' should be used, but I cannot get my validation fuction to work. For the purpose of background, I am subtracting one time from another.
Think of the following problem.
The user enters "123".
What does this mean? Is it 12:30 or 01.23?
That's why Designer does not allow pattern like time{HM} or time{HMM}.
You will have to add a kind of separator to the pattern, so the logic behind knows, what part of the entered value is for the hours and which for the minutes.
But you can use a little FormCalc script in the exit:Event of the field to add an extra 0 if the length is only three.
radzmar
• LoveCycle Blog
Documents you need:
• LiveCycle Designer ES2 Docs