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.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment