Skip to main content

DxDateEdit<T>.ClearButtonDisplayMode Property

Specifies whether the Date Edit displays the Clear button when it is not empty.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v22.1.dll

Declaration

[Parameter]
public DataEditorClearButtonDisplayMode ClearButtonDisplayMode { get; set; }

Property Value

Type Default Description
DataEditorClearButtonDisplayMode Never

A DataEditorClearButtonDisplayMode enumeration value.

Available values:

Name Description
Auto

The clear button is visible when an editor is not empty.

Never

The clear button is not visible.

Remarks

The Clear button clears the editor’s value (sets it to NullValue, if specified, or to null). To display this button in the editor when it has a value, set the ClearButtonDisplayMode property to DataEditorClearButtonDisplayMode.Auto. In this mode, the editor’s data type should be nullable or the NullValue should be specified.

<DxDateEdit @bind-Date="@DateTimeValue"
            ClearButtonDisplayMode="DataEditorClearButtonDisplayMode.Auto"></DxDateEdit>

@code {
    DateTime? DateTimeValue { get; set; } = DateTime.Now;
}

DateEdit Clear Button

Run Demo: Date Edit - Null Date Values and Placeholder

See Also