diff --git a/Web App/web/src/components/CarFormModal.vue b/Web App/web/src/components/CarFormModal.vue index 3c74515..9687bc7 100644 --- a/Web App/web/src/components/CarFormModal.vue +++ b/Web App/web/src/components/CarFormModal.vue @@ -2,6 +2,7 @@ import { ref } from "vue"; import { api } from "../api"; import { t } from "../i18n"; +import DateField from "./DateField.vue"; import Modal from "./Modal.vue"; import PartialDateField from "./PartialDateField.vue"; @@ -126,7 +127,7 @@ async function submit() {
{{ t("forms.document.renewalHint") }}
diff --git a/Web App/web/src/components/FuelFormModal.vue b/Web App/web/src/components/FuelFormModal.vue index b0cd415..7469c46 100644 --- a/Web App/web/src/components/FuelFormModal.vue +++ b/Web App/web/src/components/FuelFormModal.vue @@ -4,6 +4,7 @@ import { api } from "../api"; import { applyAttachment } from "../lib/attachment.js"; import { t, tSplit } from "../i18n"; import AttachmentField from "./AttachmentField.vue"; +import DateField from "./DateField.vue"; import Modal from "./Modal.vue"; const props = defineProps({ @@ -82,7 +83,7 @@ function payload() {{{ t("forms.technical.failedHint") }}
diff --git a/Web App/web/src/i18n/da.json b/Web App/web/src/i18n/da.json index bccdfda..45911b0 100644 --- a/Web App/web/src/i18n/da.json +++ b/Web App/web/src/i18n/da.json @@ -19,7 +19,8 @@ "download": "Download", "empty": "—", "yes": "Ja", - "no": "Nej" + "no": "Nej", + "dateUnits": { "y": "åååå", "m": "mm", "d": "dd" } }, "nav": { @@ -643,6 +644,10 @@ }, "forms": { + "common": { + "pickDate": "Åbn kalender", + "dateInvalid": "Indtast en gyldig dato i dette format." + }, "car": { "addTitle": "Tilføj en bil", "editTitle": "Rediger bil", diff --git a/Web App/web/src/i18n/en.json b/Web App/web/src/i18n/en.json index 02182e4..c452542 100644 --- a/Web App/web/src/i18n/en.json +++ b/Web App/web/src/i18n/en.json @@ -19,7 +19,8 @@ "download": "Download", "empty": "—", "yes": "Yes", - "no": "No" + "no": "No", + "dateUnits": { "y": "yyyy", "m": "mm", "d": "dd" } }, "nav": { @@ -642,6 +643,10 @@ }, "forms": { + "common": { + "pickDate": "Open calendar", + "dateInvalid": "Enter a real date in this format." + }, "car": { "addTitle": "Add a car", "editTitle": "Edit car", diff --git a/Web App/web/src/i18n/pl.json b/Web App/web/src/i18n/pl.json index 6609ceb..cb7382b 100644 --- a/Web App/web/src/i18n/pl.json +++ b/Web App/web/src/i18n/pl.json @@ -19,7 +19,8 @@ "download": "Pobierz", "empty": "—", "yes": "Tak", - "no": "Nie" + "no": "Nie", + "dateUnits": { "y": "rrrr", "m": "mm", "d": "dd" } }, "nav": { @@ -657,6 +658,10 @@ }, "forms": { + "common": { + "pickDate": "Otwórz kalendarz", + "dateInvalid": "Wpisz istniejącą datę w tym formacie." + }, "car": { "addTitle": "Dodaj samochód", "editTitle": "Edytuj samochód", diff --git a/Web App/web/src/style.css b/Web App/web/src/style.css index 45557ce..d5f90ba 100644 --- a/Web App/web/src/style.css +++ b/Web App/web/src/style.css @@ -324,6 +324,43 @@ body { box-shadow: var(--shadow-focus); } + /* DateField: the browser's picker parked out of sight behind the calendar + button, so the visible box can keep the user's own segment order. Not + display:none — showPicker() needs a rendered element to open against. */ + .dv-date-picker { + position: absolute; + right: 0.5rem; + bottom: 0; + width: 1px; + height: 1px; + padding: 0; + border: 0; + opacity: 0; + pointer-events: none; + } + .dv-date-open { + position: absolute; + top: 50%; + right: 0.25rem; + transform: translateY(-50%); + display: flex; + align-items: center; + justify-content: center; + padding: 0.25rem; + border-radius: var(--radius-control); + color: var(--text-muted); + transition: color 0.15s, background 0.15s; + } + .dv-date-open:hover { + color: var(--text-strong); + background: var(--surface-sunken); + } + .dv-date-open:focus-visible { + outline: none; + color: var(--text-strong); + box-shadow: var(--shadow-focus); + } + .dh-label { display: block; margin-bottom: 0.375rem;