DateTimePicker: how can I remove the “time” section?

  Kiến thức lập trình

I’ve a generic DateTimePicker control in MahApps:

<controls:DateTimePicker x:Name="CreationDate"
                         SelectedDateTime="{Binding CreationDate}"
                         Width="170"
                         Height="40"
                         HorizontalAlignment="Left"
                         VerticalAlignment="Top"
                         Culture="en-US"
                         Focusable="False"
                         controls:TextBoxHelper.Watermark="Creation Date"
                         controls:TextBoxHelper.UseFloatingWatermark="True"
                         SelectedDateFormat="Short"
                         SelectedTimeFormat="Short" />

But I’m not able to hide the Time (both on textbox, and on the popup opened when I click the icon.

How can I remove it?

3

LEAVE A COMMENT