DateTime Column
FdcDateTimeColumn is used for combined date-and-time values. It supports built-in picker affordances and flexible formatting so the same field can be shown in full, in a compact technical layout, or in a more date-focused presentation.
DateTime column sample
Loading FDC sample…
FdcGrid(
dataSet: scheduleRows,
options: const FdcGridOptions(autoEdit: true),
columns: const [
FdcTextColumn(fieldName: 'activity', width: 170),
FdcDateTimeColumn(fieldName: 'logged_at', width: 175, showPicker: true),
FdcDateTimeColumn(
fieldName: 'scheduled_at',
width: 170,
formatSettings: FdcFormatSettings(dateTimeFormat: 'yyyy-MM-dd HH:mm'),
),
FdcDateTimeColumn(
fieldName: 'reminder_at',
width: 140,
showPicker: false,
formatSettings: FdcFormatSettings(dateTimeFormat: 'MM/dd/yyyy'),
),
],
);
Key characteristics
- Binds to
FdcDateTimeField. - Supports
showPickerfor the built-in picker affordance. - Supports
formatSettings, including customdateTimeFormatvalues. - Works well for timestamps, appointments, schedules, and audit fields.
Formatting examples
const FdcDateTimeColumn<dynamic>(
fieldName: 'scheduled_at',
label: 'Scheduled',
formatSettings: FdcFormatSettings(
dateTimeFormat: 'yyyy-MM-dd HH:mm',
),
)
The sample above demonstrates multiple configurations in one grid: a default full date-time view, a compact format, and a date-only presentation for the same general value type.