I want to give ability to paste a date into EDITABLE_DATE_COL_DEF
defined below:
// columns.ts
export const EDITABLE_DATE_COL_DEF: AgGrid.ColDef = {
...columns.DEFAULT_COL_DEF,
cellDataType: "dateString",
cellEditor: "agDateStringCellEditor",
cellEditorParams: {
min: columns.formatDate(columns.addDays(columns.dateInTimeZone(new Date()), -180)),
max: columns.formatDate(columns.dateInTimeZone(new Date())),
},
editable: true,
};
The EDITABLE_DATE_COL_DEF
is used in the buildGrid in my controller.ts:
function buildGrid($grid: HTMLElement, dataCallbacks: datasource.DatasourceCallbacks, ctrlCallbacks: CtrlCallbacks) {
// (...)
const colDefs: AgGrid.ColDef[] = [
{ field: "payment_date", ...EDITABLE_DATE_COL_DEF, ...DATE_FILTER_COL_DEF, sortable: true },
// (...) other fields
I can’t find anything relevant in the AG-Grid docs. Is there a way to do this without loosing build-in AG-Grid datepicker?