Skip to content

Commit

Permalink
Merge pull request #335 from efekancakmak/iso-date-column-copyvalue-fix
Browse files Browse the repository at this point in the history
Iso date column copyvalue fix
  • Loading branch information
nick-keller authored Nov 27, 2024
2 parents 7455275 + 30c9048 commit 43f52fd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/columns/isoDateColumn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ IsoDateComponent.displayName = 'IsoDateComponent'
export const isoDateColumn: Partial<Column<string | null, any, string>> = {
component: IsoDateComponent as CellComponent<string | null, any>,
deleteValue: () => null,
copyValue: ({ rowData }) => rowData,
// Because the Date constructor works using iso format, we can use it to parse ISO string back to a Date object
pasteValue: ({ value }) => {
const date = new Date(value.replace(/\.\s?|\//g, '-'))
Expand Down

0 comments on commit 43f52fd

Please sign in to comment.