I have found an issue in date time picker when you change the customformat to be dd/mm/yyyy that when you go tot he text box if you click in the text box and change the date to be say 23/8/2017 every thing works great but if you change it to be say 1/9/2017 it will flip the date to be 9/1/2017 changing the month to January this happens when setting any of the days as 1 – 12, however it seems to work just fine if you use the calendar icon and pick from the calendar directly everything works just fine this issue only comes up when you manually enter in the date. any ideas on how to fix this or should i just make it so you can no longer manually enter in dates?
Thank, will be fixed in 1.4.
I have attached a MyDateTimePicker.cs class that you can use as a temporary fix. Actually with this class you can override the parsing to fit your app.
The problem is that DateTimePicker tries to be a bit lax with the parsing of custom formats and uses, in this order, this list “d”, “D”, “T”, “t”, Custom. So when the string fits the system’s formats it’s a match before the custom format.
The correct way to do this is to force the text to match the custom format, when defined, and don’t try to match the system formats at all.
Please login first to submit.