bounded MaskedTextBox allow user to enter empty value to date

  • Thread starter Thread starter mtczx232
  • Start date Start date
the real story is:

I have Masked Textbox with shortdate format. but this format is not
consider with the Global format. so if I put mask like 00/00/0000 it's
not work on client that his format is 00/00/00.

for while i code the mask like that:

If
System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern.EndsWith("yyyy")
Then
txtBirthDate.Mask = "00/00/0000"
else
txtBirthDate.Mask = "00/00/00"
end if

have better solution?
 
Back
Top