bounded MaskedTextBox allow user to enter empty value to date

  • Thread starter Thread starter mtczx232
  • Start date Start date
M

mtczx232

bounded MaskedTextBox not allow me to delete the date and leave it
empty?
 
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top