Skip to content

The open alternative to Salesforce, designed for AI.

Format creation date

Anders Borch27d48674882c
diff --git a/front/src/pages/people/People.tsx b/front/src/pages/people/People.tsx
index 0db1144a59d..3490cd2d1b9 100644
--- a/front/src/pages/people/People.tsx
+++ b/front/src/pages/people/People.tsx
@@ -23,7 +23,7 @@ type Person = {
email: string;
company: Company;
phone: string;
- creationDate: string;
+ creationDate: Date;
pipe: Pipe;
city: string;
countryCode: string;
@@ -50,7 +50,7 @@ const defaultData: Array<Person> = [
company: { id: 1, name: 'Qonto', logo: 'https://qonto.eu/logo.png' },
phone: '06 12 34 56 78',
- creationDate: 'Feb 23, 2018',
+ creationDate: new Date('Feb 23, 2018'),
pipe: { id: 1, name: 'Sales Pipeline', icon: 'faUser' },
city: 'Paris',
countryCode: 'FR',
@@ -61,7 +61,7 @@ const defaultData: Array<Person> = [
company: { id: 1, name: 'Qonto', logo: 'https://qonto.eu/logo.png' },
phone: '06 12 34 56 78',
- creationDate: 'Feb 23, 2018',
+ creationDate: new Date('Feb 23, 2018'),
pipe: { id: 1, name: 'Sales Pipeline', icon: 'faUser' },
city: 'Paris',
countryCode: 'FR',
@@ -72,7 +72,7 @@ const defaultData: Array<Person> = [
company: { id: 1, name: 'Qonto', logo: 'https://qonto.eu/logo.png' },
phone: '06 12 34 56 78',
- creationDate: 'Feb 23, 2018',
+ creationDate: new Date('Feb 23, 2018'),
pipe: { id: 1, name: 'Sales Pipeline', icon: 'faUser' },
city: 'Paris',
countryCode: 'FR',
@@ -83,7 +83,7 @@ const defaultData: Array<Person> = [
company: { id: 1, name: 'Qonto', logo: 'https://qonto.eu/logo.png' },
phone: '06 12 34 56 78',
- creationDate: 'Feb 23, 2018',
+ creationDate: new Date('Feb 23, 2018'),
pipe: { id: 1, name: 'Sales Pipeline', icon: 'faUser' },
city: 'Paris',
countryCode: 'FR',
@@ -94,7 +94,7 @@ const defaultData: Array<Person> = [
company: { id: 1, name: 'Qonto', logo: 'https://qonto.eu/logo.png' },
phone: '06 12 34 56 78',
- creationDate: 'Feb 23, 2018',
+ creationDate: new Date('Feb 23, 2018'),
pipe: { id: 1, name: 'Sales Pipeline', icon: 'faUser' },
city: 'Paris',
countryCode: 'FR',
@@ -145,6 +145,12 @@ const columns = [
}),
columnHelper.accessor('creationDate', {
header: () => <TableHeader viewName="Creation" viewIcon={faCalendar} />,
+ cell: (props) =>
+ new Intl.DateTimeFormat(undefined, {
+ month: 'short',
+ day: 'numeric',
+ year: 'numeric',
+ }).format(props.row.original.creationDate),
}),
columnHelper.accessor('pipe', {
header: () => <TableHeader viewName="Pipe" viewIcon={faRectangleList} />,