DxDateEdit<T>.TimeSectionVisible Property

Specifies whether the Date Edit displays a time section.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v20.2.dll

Declaration

[Parameter]
public bool TimeSectionVisible { get; set; }

Property Value

Type Description
Boolean

true to display the time section; otherwise, false.

Remarks

You can enable time input in a Date Edit. If enabled, the editor displays the Time tab in the dropdown and a time input section in the edit box.

To add the time section to the component, set the TimeSectionVisible property to true.

<DxDateEdit @bind-Date="@DateTimeValue"
            TimeSectionVisible="true"></DxDateEdit>

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

Date Edit - Time Section

If you add a time section to the Date Edit, you can also use the DisplayFormat and Format properties to format the time value in display and edit modes, respectively.

The following example demonstrates how to apply the full date long time format in display mode and the full date short time format in edit mode:

<DxDateEdit @bind-Date="@DateTimeValue" 
            TimeSectionVisible="true" 
            DisplayFormat="F" 
            Format="f">
</DxDateEdit>

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

DateEdit Format

Run Demo: Date Edit - Time Section

See Also