Merged in fix/SW-2801-correct-date-formats (pull request #2400)

fix(SW-2801): Added lang specific date formats

* fix(SW-2801): Added lang specific date formats

* fix: wrong type import


Approved-by: Michael Zetterberg
This commit is contained in:
Tobias Johansson
2025-06-25 11:12:28 +00:00
parent c0efbd17ff
commit 8272327993
18 changed files with 114 additions and 33 deletions

View File

@@ -24,7 +24,7 @@
.partial {
grid-template-columns:
minmax(auto, 120px) min-content minmax(auto, 120px)
minmax(auto, 120px) min-content 1fr
auto;
}

View File

@@ -8,6 +8,7 @@ import { Divider } from "@scandic-hotels/design-system/Divider"
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
import { Typography } from "@scandic-hotels/design-system/Typography"
import { shortDateFormat } from "@/constants/dateFormats"
import { dt } from "@/lib/dt"
import SkeletonShimmer from "@/components/SkeletonShimmer"
@@ -32,8 +33,12 @@ export default function MobileToggleButton({
name: "selectedSearch",
})
const selectedFromDate = dt(date.fromDate).locale(lang).format("D MMM")
const selectedToDate = dt(date.toDate).locale(lang).format("D MMM")
const selectedFromDate = dt(date.fromDate)
.locale(lang)
.format(shortDateFormat[lang])
const selectedToDate = dt(date.toDate)
.locale(lang)
.format(shortDateFormat[lang])
const locationAndDateIsSet = searchTerm && date