Skip to content

Commit

Permalink
feat(vuetify): use date-fns
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentin-Guillemin committed Aug 23, 2024
1 parent 5f059ec commit 535bc78
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"devDependencies": {
"@commitlint/cli": "^19.4.0",
"@commitlint/config-conventional": "^19.2.2",
"@date-io/date-fns": "^3.0.0",
"@fortawesome/fontawesome-svg-core": "^6.6.0",
"@fortawesome/free-regular-svg-icons": "^6.6.0",
"@fortawesome/free-solid-svg-icons": "^6.6.0",
Expand Down
9 changes: 9 additions & 0 deletions src/main/webapp/src/plugins/vuetify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/
import i18n from '@/plugins/i18n.ts';
import DateFnsAdapter from '@date-io/date-fns';
import { enUS, fr } from 'date-fns/locale';
import { useI18n } from 'vue-i18n';
import { type ThemeDefinition, createVuetify } from 'vuetify';
import { md3 } from 'vuetify/blueprints';
Expand Down Expand Up @@ -50,4 +52,11 @@ export default createVuetify({
locale: {
adapter: createVueI18nAdapter({ i18n, useI18n }),
},
date: {
adapter: DateFnsAdapter,
locale: {
fr,
en: enUS,
},
},
});
22 changes: 22 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,27 @@ __metadata:
languageName: node
linkType: hard

"@date-io/core@npm:^3.0.0":
version: 3.0.0
resolution: "@date-io/core@npm:3.0.0"
checksum: 10/0dcd44db8fcb5f2fd2c3de895bd3316edd25447ead83572c322801c94e5de36ea96b5b2d14b8224398308425f6320378ff198921b8159cc89ec8c61cb7af652f
languageName: node
linkType: hard

"@date-io/date-fns@npm:^3.0.0":
version: 3.0.0
resolution: "@date-io/date-fns@npm:3.0.0"
dependencies:
"@date-io/core": "npm:^3.0.0"
peerDependencies:
date-fns: ^3.2.0
peerDependenciesMeta:
date-fns:
optional: true
checksum: 10/3747421bfae96d2ab8b6a48c20c59dba267839ef7bd5eb2b0c2b8aa5e1f3696c864444db4e0712c6e7a4c1996a71289fbb870b902920cd06de629fc678c09824
languageName: node
linkType: hard

"@esbuild/aix-ppc64@npm:0.21.5":
version: 0.21.5
resolution: "@esbuild/aix-ppc64@npm:0.21.5"
Expand Down Expand Up @@ -2170,6 +2191,7 @@ __metadata:
dependencies:
"@commitlint/cli": "npm:^19.4.0"
"@commitlint/config-conventional": "npm:^19.2.2"
"@date-io/date-fns": "npm:^3.0.0"
"@fortawesome/fontawesome-svg-core": "npm:^6.6.0"
"@fortawesome/free-regular-svg-icons": "npm:^6.6.0"
"@fortawesome/free-solid-svg-icons": "npm:^6.6.0"
Expand Down

0 comments on commit 535bc78

Please sign in to comment.