Skip to content

Commit

Permalink
fix(ui): improve date handling per locale (#4600)
Browse files Browse the repository at this point in the history
  • Loading branch information
deluxebear authored and brian-mulier-p committed Aug 8, 2024
1 parent f91b070 commit 0e46055
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/src/utils/charts.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function chartClick(moment, router, route, event) {
const query = {};

if (event.date) {
const formattedDate = moment(event.date, "DD/MM/YYYY");
const formattedDate = moment(event.date, moment.localeData().longDateFormat("L"));
query.startDate = formattedDate.toISOString(true);
query.endDate = formattedDate.add(1, "d").toISOString(true);
}
Expand Down
2 changes: 1 addition & 1 deletion ui/src/utils/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {createRouter, createWebHistory} from "vue-router";
import VueGtag from "vue-gtag";
import {createI18n} from "vue-i18n";
import moment from "moment-timezone";
import "moment/locale/fr"
import "moment/dist/locale/fr"
import {extendMoment} from "moment-range";
import VueSidebarMenu from "vue-sidebar-menu";
import {
Expand Down

0 comments on commit 0e46055

Please sign in to comment.