M
Matt
I have a number of TextBox controls bound to date fields in my
application, and have come across a disconcerting issue: When you are
entering data into the bound field, if you enter any string that cannot
be converted by the system into the date/time format, the application
will not allow you to leave the TextBox control, even to close the
window. It doesn't throw up an error or provide any feedback, you simply
cannot click or tab out of the control until you input a valid string
that may be converted to a date/time. While I can understand the need to
get proper values into the field, it makes no sense to me that you would
make the user simply unable to exit the field, and display no feedback
whatsoever.
Worse, however, is the fact that, once you have entered any value into
the field, you cannot delete that value (i.e., return the TextBox to an
empty state). I would assume this is due to the fact that it does not
accept "" (null string) as a valid entry for date/time values, but it
still causes innumerable headaches, and should really be handled
properly by the control.
Has anyone found an effective way to get around this issue, and can
anyone explain why Microsoft chose to code the controls in this manner?
Thanks,
Matt
application, and have come across a disconcerting issue: When you are
entering data into the bound field, if you enter any string that cannot
be converted by the system into the date/time format, the application
will not allow you to leave the TextBox control, even to close the
window. It doesn't throw up an error or provide any feedback, you simply
cannot click or tab out of the control until you input a valid string
that may be converted to a date/time. While I can understand the need to
get proper values into the field, it makes no sense to me that you would
make the user simply unable to exit the field, and display no feedback
whatsoever.
Worse, however, is the fact that, once you have entered any value into
the field, you cannot delete that value (i.e., return the TextBox to an
empty state). I would assume this is due to the fact that it does not
accept "" (null string) as a valid entry for date/time values, but it
still causes innumerable headaches, and should really be handled
properly by the control.
Has anyone found an effective way to get around this issue, and can
anyone explain why Microsoft chose to code the controls in this manner?
Thanks,
Matt