I have a MaskedTextBox that has the mask 00/00/\2\000 (restricting input to XX/XX/20XX) and DateTime values with a single digit month or day recently started displaying incorrectly. The MaskedTextBox.Text property is bound to BindingSource.SomeProperty (of type DateTime.)
I know that at some level of data-binding the ToString method is being invoked, and I expect the call is not padding month/day with zeroes.
I tried setting the advanced data-binding properties to set a DateTime format type on the MaskedTextBox.Text property, but this doesn't help.
How can I apply a format string (eg. ToString("MMddyyyy")) when converting the DateTime object to a string, before the value is bound to the Text property?