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.
The method splits the text string and identifies the year component. In cases where the year is less than 1000 the parsed date is incorrectly determined.
For example the year 0005 gets parsed to an integer value of 5 and then converted to a string of 5.
This string is later used in DateTime.TryParse which then assumes that 5 means 2005.
A possible solution is to pad the year with zeros until the length of the year string is 4.
A possible work around is:
```
key = "Year";
value = currentDate.Year.ToString();
while (value.Length < 4)
{
value = "0" + value;
}
```
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.
The method splits the text string and identifies the year component. In cases where the year is less than 1000 the parsed date is incorrectly determined.
For example the year 0005 gets parsed to an integer value of 5 and then converted to a string of 5.
This string is later used in DateTime.TryParse which then assumes that 5 means 2005.
A possible solution is to pad the year with zeros until the length of the year string is 4.
A possible work around is:
```
key = "Year";
value = currentDate.Year.ToString();
while (value.Length < 4)
{
value = "0" + value;
}
```
Comments: Fixed in v2.1.