I am trying to ensure that the time the user inputs is in the HH:MM format. I understand the use of the data pattern, but I want the value to be correct on exit. The problem with data pattern is it provides the message alert but allows the value to be entered. When I use my current scripting to calculate the time entered of Time1=6:00 and Time2=13:00, I get 43 hours. When I enter the time as 06:00 and 13:00 accordingly, my answer is correct as 7 hours. What formcalc or javascript scripting do I use on the exit event for the following two conditions:
1. If the user enters a morning value of X:XX, it automatically enters the zero in front: 0X:XX.
2. If the user enters time without the colon (:), it automatically enters the colon.
time{H:MM}|time{H.MM}|time{H-MM}|time{H MM}
and this pattern for displaying the time
time{HH:MM}
radzmar
• LoveCycle Blog
Documents you need:
• LiveCycle Designer ES2 Docs