PlutoColumnType.date constructor

PlutoColumnType.date({
  1. dynamic defaultValue = '',
  2. DateTime? startDate,
  3. DateTime? endDate,
  4. String format = 'yyyy-MM-dd',
  5. String headerFormat = 'yyyy-MM',
  6. bool applyFormatOnInit = true,
  7. IconData? popupIcon = Icons.date_range,
})

Set as a date column.

startDate Range start date (If there is no value, Can select the date without limit)

endDate Range end date

format 'yyyy-MM-dd' (2020-01-01)

headerFormat 'yyyy-MM' (2020-01) Display year and month in header in date picker popup.

applyFormatOnInit When the editor loads, it resets the value to format.

Set the suffixIcon in the popupIcon cell. Tap this icon to open the date selection popup. The default icon is displayed, and if this value is set to null , the icon does not appear.

Implementation

factory PlutoColumnType.date({
  dynamic defaultValue = '',
  DateTime? startDate,
  DateTime? endDate,
  String format = 'yyyy-MM-dd',
  String headerFormat = 'yyyy-MM',
  bool applyFormatOnInit = true,
  IconData? popupIcon = Icons.date_range,
}) {
  return PlutoColumnTypeDate(
    defaultValue: defaultValue,
    startDate: startDate,
    endDate: endDate,
    format: format,
    headerFormat: headerFormat,
    applyFormatOnInit: applyFormatOnInit,
    popupIcon: popupIcon,
  );
}