DxDateEdit<T>.NullText Property
Specifies the Date Edit’s prompt text when the editor’s value is null.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v20.2.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 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.
<DxDateEdit @bind-Date="@DateTimeValue"
ClearButtonDisplayMode="DataEditorClearButtonDisplayMode.Auto"
NullText="Select a date..." ></DxDateEdit>
@code {
DateTime? DateTimeValue { get; set; } = new DateTime(2020, 01, 01);
}
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.