Skip to main content
All docs

DxTimeEditSettings.Format Property

Specifies the pattern used to format time editor values.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor


public string Format { get; set; }

Property Value

Type Default Description
String null

The format pattern. If it is not set, the long time format is applied.


Use the Format property to format the time editor value when the editor is focused, and use the DisplayFormat to format the value when the editor is unfocused. If the DisplayFormat property is not set, the Format property affects both edit and display values.

Refer to the Standard Date and Time Format Strings and Custom Date and Time Format Strings help topics for more information about supported formats.

<DxGrid Data="@timetable" EditMode="GridEditMode.EditRow">
        <DxGridCommandColumn />
        <DxGridDataColumn FieldName="ID" Visible="false" />
        <DxGridDataColumn FieldName="Nickname" />
        <DxGridDataColumn FieldName="StartTime">
                <DxTimeEditSettings Format="h:mm"
                                    OutOfRangeNotificationText="Game time can start from 9 am to 8 pm."
                                    ScrollPickerFormat="tt hh mm" />
        <DxGridDataColumn FieldName="EndTime" >
                <DxTimeEditSettings Format="h:mm"
                                    OutOfRangeNotificationText="Game time can end from 9 am to 9 pm."
                                    ScrollPickerFormat="tt hh mm" />

@code {
    Result[]? timetable;
    TimeSpan MinTime = new TimeSpan(09, 0, 0);
    TimeSpan MaxStartTime = new TimeSpan(20, 0, 0);
    TimeSpan MaxEndTime = new TimeSpan(21, 0, 0);

    protected override async Task OnInitializedAsync() {
        timetable = await TimeTable.GetData();

Grid - Time Editor

To change the format at runtime, use the ITimeEditSettings.Format property instead.


See Also