How did you code that? You probably need to use typeof(DateTime) and a string value:
[DefaultValue(typeof(DateTime), "5/27/08")]
I'm not sure (because I haven't actually tried it), but you *might* be able to get away with this:
[DefaultValue(typeof(DateTime), DateTime.Today.ToString())]
~~Bonnie
>Hi everybody,
>
>In the UserControl I'd like to set a DefaultValue for the custom date property. I tried DefaultValue(DateTime.Today), but it returns an error in compile time. What should I set as a default value (how can I create some fixed datetime value)?
>
>Thanks in advance.