Search
More About This Website

All information is provided "AS IS" with no warranties, and confers no rights

Login
« Heading to CES 2009 | Main | Blend Missing Method - Silverlight Isolated Storage »
Monday
Dec292008

Silverlight – DatePicker Hiding Time

If you can’t stop time, you should hide time!  The Silverlight DatePicker by default seems to want to show the time attached to the date you pick.  So in the following example it doesn’t make sense to have the time attached. 

image

Some of the formatting for basic things seems more complicated than it needs to be in Silverlight/WPF, sometimes just having a format string property that was flexible enough to handle many of the cases would be nice.  We don’t always want to have to create Value Converters just to format data.

Anyway I came across this forum post that gives the answer to how to handle the problem using the .Text property on the picker.

image

After that, the date looks a little better!

image

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>