DxDateEdit<T>.NullText Property

Specifies the Date Edit's prompt text when the editor's value is null.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.dll

Declaration

[Parameter]
public string NullText { get; set; }

Property Value

Type Description
String

A string value that specifies the prompt text.

Remarks

If the Date Edit component has the Nullable DateTime type, users can delete the editor value (set it to null).

You can also set the ClearButtonDisplayMode property to Auto to show the Clear button when the editor has a non-null value. Use the NullText property to specify the prompt text when the editor's value is null.

Date Edit NullText

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

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

Online Demo: Date Edit - Nullable Date

You can also specify a custom null value for the Date Edit component. This value can be used with both nullable and regular DateTime types. For more information, refer to NullValue.

See Also