DxDateEdit<T>.NullValue Property

Specifies a null value for the Date Edit component.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v20.2.dll


public DateTime NullValue { get; set; }

Property Value

Type Description

A DateTime object the specifies a null value.


Use the NullValue property to specify a null value for the editor.

If the editor is bound to the Nullable DateTime type, use the NullValue property to override the editor's null value. Each time a user clears the Date Edit's content, the editor's values is set to NullValue. If the NullValue is not specified, the editor's values is set to NULL.

If the editor is bound to the regular (non-nullable) DateTime type, specify the NullValue property to allow users to clear the editor's content.

Additionally, use the NullText property to specify the prompt text displayed when the editor is set to a null value. You can also set the ClearButtonDisplayMode to Auto to display the Clear button in the editor when there is a value in it.

Date Edit NullText

<DxDateEdit @bind-Date="@DateTimeValue"
            NullText="Select a date..."
            NullValue="@NullValue" ></DxDateEdit>

@code {
    DateTime DateTimeValue { get; set; } 
    DateTime NullValue { get; set; } = new DateTime(2020, 01, 01);

Run Demo: Date Edit - Nullable Date

See Also