customize or extend textbox datatype Time (time) format - InfoPath Dev
in

InfoPath Dev

customize or extend textbox datatype Time (time) format

Last post 07-13-2009 12:51 PM by dvnandover. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 07-10-2009 01:03 PM

    customize or extend textbox datatype Time (time) format

    i like the way infopath format the textbox datatype for time but the tool tip is wrong and i would to know if it is posible to customize it to provide more accurate tool tip for the user or maybe even extend further. Here is an example: in my application i have a textbox which set to format in time string like: 9:30 AM ET where ET is optional so in Data tab of the textbox properties i choose Data Type to be Time (timne) then i click for the format.. button. In side the Time format dialog box i checked "Display the time like this:" check box and select 9:46 AM and click OK. The textbox worked nicely and when you typed in 10 it automatically formated to 10:00 AM and if you type in 13 it automatically formated it to 1:00 PM. But if the user typed in a wrong format the tool tip displayed a message like "Only time allowed (example: 13:30:55)", which was not accurate. So is there a way to customize or extend it to give it a more accurate tool tip? is there a way to extend it to get it format the way i like? if not, has anyone have a better way of formating or validating the textbox to get the format using Rules or Data Validation?

  • 07-13-2009 08:37 AM In reply to

    Re: customize or extend textbox datatype Time (time) format

    Here is what i had so far using custom pattern: \d?\d:\d\d AM ?E?T? and \d?\d:\d\d PM ?E?T? it seem to work except if the user typed in something like this: 9:20 AM E and infopath did not throw an error. How do i group ET as a group  to be optional. I have \d?\d:\d\d PM[ ET]? but it did not work. Can someone help? I can't seem to be able to use quare braket in the expression

  • 07-13-2009 12:51 PM In reply to

    Re: customize or extend textbox datatype Time (time) format

    It is working now: [0-2]?[0-9]:[0-5][0-9][ ][aApP][mM]([ ][eE][tT])? but it still doesn't give me the automatic conversion like the way autoformat does. i.e..typed in 10 i will get 10:00 AM...

    Does anyone has any suggestions at all?

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.