DxTimeEdit<T>.ClearButtonDisplayMode Property

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

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v20.2.dll

Declaration

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

Property Value

Type Description
DataEditorClearButtonDisplayMode

A DataEditorClearButtonDisplayMode enumeration value.

Remarks

The Clear button clears the editor's value (sets it 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.

Use the NullText property to specify the prompt text when the editor's value is null.

<DxTimeEdit @bind-Time="@TimeValue"
            ClearButtonDisplayMode="DataEditorClearButtonDisplayMode.Auto"
            NullText="Select time...">
</DxTimeEdit>

@code {
    TimeSpan? TimeValue { get; set; } = DateTime.Now.TimeOfDay;
}

Time Edit ClearButton

Run Demo: Time Edit - Nullable Date

See Also