This project has moved and is read-only. For the latest updates, please go here.

Date only DateTimePicker

Apr 25, 2012 at 11:44 AM

The toolkit has a TimePicker and a DateTimePicker but is there any way to get a date only picker? I can set the format property in the DateTimePicker to be just a date but it still prompts for a time when the dropdown caldendar box is displayed.

Could there be an easy way of hiding the time part of the dropdown? (I know WPF 4 has a DatePicker control but I want to try and keep my date/time pickers looking the same with minimum styling).


Apr 25, 2012 at 7:32 PM

Have you tried to set an implicit style on the TimePicker within your DateTimePicker's style like this?


            <Style TargetType="{x:Type xctk:TimePicker}">
               <Setter Property="Visibility"
                       Value="Collapsed" />
Apr 25, 2012 at 11:24 PM

Thankyou - thats worked a treat. I hadn't thpught of using an implicit style in this way.