Display only date and no time

The Solution to Display only date and no time is


Just had to deal with this scenario myself - found a really easy way to do this, simply annotate your property in the model like this:

[DataType(DataType.Date)]
public DateTime? SomeDateProperty { get; set; }

It will hide the time button from the date picker too.

Sorry if this answer is a little late ;)

~ Answered on 2012-10-31 08:32:22


Most Viewed Questions: