IDateEditSettings.TimeSectionScrollPickerFormat Property
Specifies the format of the time in the time section.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.1.dll
NuGet Package: DevExpress.Blazor
Declaration
[Parameter]
string TimeSectionScrollPickerFormat { get; set; }
Property Value
Type | Description |
---|---|
String | A time formatting pattern. |
Remarks
When the time section is visible in the date editor, use the TimeSectionScrollPickerFormat
property to change the format of the time value in the time section’s scroll picker at runtime. To specify the format in markup, use the DxDateEditSettings.TimeSectionScrollPickerFormat property.
The default scroll picker format depends on the current culture. The time section’s scroll picker supports the following time format specifiers:
h
andhh
for hoursm
andmm
for minutess
andss
for secondst
andtt
for a day period
The IDateEditSettings interface allows you to get and customize settings of a date editor at runtime. You can get editor settings in the following ways:
Call the GetColumnEditSettings method to get editor settings of the column bound to the specified data source field.
Important
You need to enclose your code between BeginUpdate and EndUpdate method calls to change values of Grid component parameters outside the Grid component markup. Otherwise, an exception occurs.
var dateEditSettings = e.Grid.GetColumnEditSettings<IDateEditSettings>("HireDate"); if(dateEditSettings != null) { e.Grid.BeginUpdate(); dateEditSettings.TimeSectionScrollPickerFormat="tt h m"; e.Grid.EndUpdate(); }
- Handle the CustomizeFilterRowEditor event to customize a cell editor in the filter row.
void Grid_CustomizeFilterRowEditor(GridCustomizeFilterRowEditorEventArgs e) { if(e.EditSettings is IDateEditSettings dateEditSettings) dateEditSettings.TimeSectionScrollPickerFormat="tt h m"; }
- Handle the CustomizeDataRowEditor event to customize a cell editor in a data row.
void Grid_CustomizeDataRowEditor(GridCustomizeDataRowEditorEventArgs e) { if(e.EditSettings is IDateEditSettings dateEditSettings) dateEditSettings.TimeSectionScrollPickerFormat="tt h m"; }