diff --git a/frontend/src/components/common/DateRangePicker.vue b/frontend/src/components/common/DateRangePicker.vue index 7ca90320..3ddc8ffa 100644 --- a/frontend/src/components/common/DateRangePicker.vue +++ b/frontend/src/components/common/DateRangePicker.vue @@ -17,6 +17,8 @@ :clearable="false" :min-date="minDateProp" :max-date="maxDateProp" + ignore-time-validation + :teleport="true" :week-numbers="WEEK_NUMBER_OPTIONS" :six-weeks="SIX_WEEK_CALENDAR_OPTIONS" cancel-text="Abbrechen" diff --git a/frontend/src/util/DateUtils.ts b/frontend/src/util/DateUtils.ts index 12f974e7..fafa162e 100644 --- a/frontend/src/util/DateUtils.ts +++ b/frontend/src/util/DateUtils.ts @@ -1,4 +1,4 @@ -import { head, isEqual, last, toArray } from "lodash"; +import { head, isEmpty, isEqual, last, toArray } from "lodash"; import moment from "moment"; import i18n from "@/plugins/i18n"; @@ -111,9 +111,11 @@ export function useDateUtils() { if (Date.parse(d)) { return new Date(d); } - snackbarStore.showError( - `Der angegebene Wert ${datum} kann nicht in ein Datum umgewandelt werden.` - ); + if (!isEmpty(datum)) { + snackbarStore.showError( + `Der angegebene Wert ${datum} kann nicht in ein Datum umgewandelt werden.` + ); + } return new Date(); }