Time Column
FdcTimeColumn is the time-only column type. It is designed for FdcTimeField values and supports custom formatting and optional picker affordances.
Use it for a time of day that has no calendar date, such as shift boundaries, opening hours, appointments, or daily cutoffs. Use DateTime Column when the value represents a specific moment on a specific date.
FdcGrid(
dataSet: shifts,
options: const FdcGridOptions(autoEdit: true),
columns: const [
FdcTextColumn(fieldName: 'shift', width: 120),
FdcTimeColumn(fieldName: 'opens_at', width: 120, showPicker: true),
FdcTimeColumn(
fieldName: 'handoff_at',
width: 130,
showPicker: false,
formatSettings: FdcFormatSettings(timeFormat: 'HH:mm:ss'),
),
FdcTimeColumn(fieldName: 'closes_at', width: 120, showPicker: true),
],
);
Key characteristics
- Binds to
FdcTimeField. - Supports
showPickerfor built-in picker access. - Supports
formatSettingsfor technical or business-friendly time formats. - Useful for shifts, appointments, start/end times, and reminders.
Example
const FdcTimeColumn<dynamic>(
fieldName: 'handoff_at',
label: 'Handoff',
showPicker: false,
formatSettings: FdcFormatSettings(timeFormat: 'HH:mm:ss'),
)
Editing and formatting behavior
The column validates that fieldName resolves to an FdcTimeField. During editing, users can type a value through the time-aware editor; setting showPicker: true also exposes the built-in picker affordance.
formatSettings overrides the effective display and input format for this column. If it is omitted, the grid uses the nearest inherited FdcFormatSettings, normally supplied through FdcApp or the surrounding widget tree. See Format Settings for precedence and locale-aware defaults.
Sorting, filtering, and edge cases
Sorting and scalar filters compare time values rather than their formatted labels. This keeps 09:30 before 14:00 even when the display uses a localized 12-hour format.
Time-only values do not contain a date or timezone. If a workflow crosses midnight or needs elapsed durations, model that business rule explicitly instead of assuming a time column can identify which calendar day a value belongs to.