Watermark in WPF DateTimePicker (DateTimeEdit)

The DateTimeEdit control displays hint information using watermark text when the selected date is null. In addition, it provides support to define null DateTime value.

Null value

The DateTimeEdit control accepts null values. The NullValue support in the DateTimeEdit control can be enabled by setting the IsEmptyDateEnabled property to true and ShowMaskOnNullValue property to false. If the value is null and the editing text box is empty then the Watermark will be displayed as the text in the DateTimeEdi control.

<syncfusion:DateTimeEdit x:Name="dateTimeEdit" Height="25" Width="200" ShowMaskOnNullValue="False" IsEmptyDateEnabled="True" NullValue="{x:Null}"/>

WPF DateTimeEdit display null value

Change watermark

The watermark is a help content that is used to display in the DateTimeEdit control when the IsEmptyDateEnabled property is true when the selected date is null. You can set the content of the Watermark by using the NoneDateText property.

<syncfusion:DateTimeEdit x:Name="dateTimeEdit" Height="25" Width="200" IsEmptyDateEnabled="True" NullValue="{x:Null}"/>

WPF DateTimeEdit watermark support