11-03-2012 11:08 AM
I'm using a numeric control to input a date MMDDYY. I'd like the "MMDDYY" to appear in the control as a prompt or guide for the user to input 102212 for 22Oct2012. I can get the "MMDDYY" to appear but a date appears in front of it. E.g. "10/22/2012 MMDDYY".
I can't get the 10/22/2012 to go away. There must be a very easy solution to this that I'm missing.
11-03-2012 11:27 AM
I do not see an easy way to do what I think you want. You want the MMDDYY to appear in the control and then disappear when the user starts typing numbers?
As an alternative make the Caption visible and type MMDDYY into the caption. Place it below or above the control. It will always be there, but this might be better than no prompt.
10/22/2012 is a MM/DD/YYYY format.
Lynn
11-03-2012 12:59 PM
show us your code, so that we can better understand ?
11-03-2012 02:51 PM - edited 11-03-2012 02:52 PM
@johnsold wrote:
I do not see an easy way to do what I think you want. You want the MMDDYY to appear in the control and then disappear when the user starts typing numbers?
As an alternative make the Caption visible and type MMDDYY into the caption. Place it below or above the control. It will always be there, but this might be better than no prompt.
10/22/2012 is a MM/DD/YYYY format.
Lynn
Sounds more like a format issue than a value issue. Use a dbl format appropriatly
11-03-2012 03:29 PM - edited 11-03-2012 03:33 PM
There are millions of way to get the result you currently get or to get the result that you want to get, but if you don't show us what you are actually doing, we can only take wild guesses. I don't like guessing, so show us your code!
What is the format setting of the control? Do you use one of the time formats? What is the datatype?
(It almost seems to me you are using something like an advanced format string of "%<%m/%d/%y>T MMDDYY", because numeric controls cannot show random letters as part of the value. What if you would use a format of "%<%m/%d/%y>T" instead?
If you want a greyed out default string to appear when nothing is entered, you should use a string control, set it to update value while typing, and use an event structure to sanitize the input as it is entered, for example. (you should also vote for this idea).
11-03-2012 06:26 PM
11-03-2012 06:29 PM
...Snip
"You want the MMDDYY to appear in the control and then disappear when the user starts typing numbers? Yes, exactly.
As an alternative make the Caption visible and type MMDDYY into the caption. Place it below or above the control. It will always be there, but this might be better than no prompt.
10/22/2012 is a MM/DD/YYYY format. That would help. Thanks. I still think there's a way.
Lynn
11-03-2012 06:29 PM
done.