DateTimeParser.cs
Method: GetDateParts
This method can result in a DateTime being incorrectly parsed from the display text when the text box is selected in certain circumstances.
This method splits the supplied string in to date parts using the CultureInfo.DateTimeFormat.DateSeparator for the current culture. However, there is no guarantee that this separator is the one being used in the supplied string.
This can arise in several scenarios for example when the ShortDatePattern for the current culture is overridden at application level.
This method should use an array of all possible separators in the same way DateTimeParser.ComputeDateTimeString does.
A possible work around is:
```
var dateTimeSeparators = new[] { ",", " ", "-", ".", "/", cultureInfo.DateTimeFormat.DateSeparator, cultureInfo.DateTimeFormat.TimeSeparator };
var dateFormatParts = cultureInfo.DateTimeFormat.ShortDatePattern.Split(dateTimeSeparators, StringSplitOptions.RemoveEmptyEntries).ToList();
```
Comments: Fixed in v2.1.
Method: GetDateParts
This method can result in a DateTime being incorrectly parsed from the display text when the text box is selected in certain circumstances.
This method splits the supplied string in to date parts using the CultureInfo.DateTimeFormat.DateSeparator for the current culture. However, there is no guarantee that this separator is the one being used in the supplied string.
This can arise in several scenarios for example when the ShortDatePattern for the current culture is overridden at application level.
This method should use an array of all possible separators in the same way DateTimeParser.ComputeDateTimeString does.
A possible work around is:
```
var dateTimeSeparators = new[] { ",", " ", "-", ".", "/", cultureInfo.DateTimeFormat.DateSeparator, cultureInfo.DateTimeFormat.TimeSeparator };
var dateFormatParts = cultureInfo.DateTimeFormat.ShortDatePattern.Split(dateTimeSeparators, StringSplitOptions.RemoveEmptyEntries).ToList();
```
Comments: Fixed in v2.1.