PDA

View Full Version : Time field auto format and validation



chennaiMan
04-14-2009, 11:56 AM
Please some one help me to do auto format of the time field with below rules
1. Allows user to enter time of day as ‘A’ or ‘AM’, ‘P’ or ‘PM’
2. If user enters ‘N’ it will be converted to ‘PM’
3. Minutes must have 2 digits
4. 2 digit hour is not required
5. ‘:’ is not required as a separator between hours and minutes
6. Will only accept 12 hour times. E.g. will accept 1P, will not accept 1300
7. Upon field exit TAP will automatically display time in correct. Examples of possible time inputs –
8. User enters 3P and TAP will change to 3:00 PM.
9. User enters 120P and TAP will change to 1:20PM. If user intended time to be 12P they can see the time in the corrected format and can modify


Please help to implement the same, means for auto format and also validation