If you have ever had problems setting the text of a datetimepicker to blank (rather than the default value) then the following code example is the way to do it:
if (csMahService._EndDate.HasValue)
{
dtpEndDate.Value = csMahService._EndDate.Value;
}
else
{
dtpEndDate.CustomFormat = " ";
}
Note you have to set the Format property to Custom.
Showing posts with label CustomFormat. Show all posts
Showing posts with label CustomFormat. Show all posts
Thursday, 7 August 2008
Subscribe to:
Posts (Atom)