Home › Forums › WinForms controls › Other WinForms controls › WinDatePicker
Hi all When I try to set the DatePicker’s TextBoxArea.Text in code I get an error “System.ArgumentException”Any Ideas?
Imported from legacy forums. Posted by beny (had 2098 views)
You can’t set the text property, since what’s behind the text is not a string but a date. You need to use the Value property to do this.
winDatePicker1.Value = new DateTime( 2006, 9, 27 );
Imported from legacy forums. Posted by André (had 3090 views)