Skip to main content

DxTimeEdit<T>.NullText Property

Specifies the Time Edit’s prompt text when the editor’s value is null.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v22.1.dll

NuGet Package: DevExpress.Blazor

Declaration

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

Property Value

Type Description
String

A string value that specifies the prompt text.

Remarks

If the Time Edit component is bound to a nullable DateTime or TimeSpan object, users can delete the editor value (set it to null).

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

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

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

Time Edit - Null Text

Run Demo: Time Edit - Null Time Values and Placeholder

See Also