We have used cultute info to rad datepicker using the folloing code:
CultureInfo ldtPckrcultureInfo = new CultureInfo("en-US");
DateTimeFormatInfo dateInfo = new DateTimeFormatInfo();
dateInfo.ShortDatePattern = "MM-dd-yy";
ldtPckrcultureInfo.DateTimeFormat = dateInfo;
dtpStartDate.Culture = ldtPckrcultureInfo;
This was working fine.
But when we try to enter date manually into the date picker, the order of month, day and year gets changed.
On manually adding the date value in date picker, it takes the date in the different format (dd-yy-mm)
For example, if we enter 04-06-12 (6th April 2012), it becomes 12-06-04 (12th June 2004).
If we enter 04-15-12 (15th April 2012), we get error.
If we change an existing value, suppose, 01-11-12 to 01-10-12 , it becomes 10-12-01 .