pluto_grid icon indicating copy to clipboard operation
pluto_grid copied to clipboard

Use standard datepicker

Open bastaware opened this issue 1 year ago • 1 comments

Added functionality to allow developers to choose between the standard Material DatePicker or a custom datepicker.

Without this, PlutoGrid will always use the build in date picker that does not handle localization.

Before: image

After: image

Example of usage:

                    child: PlutoGrid(
                        columns: controller.createTableColumns(),
                        rows: rows,
                        selectDateCallback: (PlutoCell cell, PlutoColumn column) async {
                          return showDatePicker(
                              context: context,
                              initialDate: PlutoDateTimeHelper.parseOrNullWithFormat(
                                    cell.value,
                                    column.type.date.format,
                                  ) ??
                                  DateTime.now(),
                              firstDate: startDate,
                              lastDate: DateTime.now());
                        }
                        ),

bastaware avatar Jun 03 '24 07:06 bastaware

Please create this in pluto_grid_plus this repo is dead

https://github.com/doonfrs/pluto_grid_plus

stan-at-work avatar Dec 07 '24 14:12 stan-at-work