mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-19 13:21:46 +00:00
fix: use user locale instead of hardcoded de-DE for number/date formatting — closes #144
- CurrencyWidget: format numbers with user's locale - ReservationModal: date formatting uses locale - TripPDF: locale fallback to browser default instead of de-DE - holidays.ts: formatDate accepts optional locale parameter
This commit is contained in:
@@ -573,5 +573,5 @@ export function ReservationModal({ isOpen, onClose, onSave, reservation, days, p
|
||||
function formatDate(dateStr, locale) {
|
||||
if (!dateStr) return ''
|
||||
const d = new Date(dateStr + 'T00:00:00')
|
||||
return d.toLocaleDateString(locale || 'de-DE', { day: 'numeric', month: 'short' })
|
||||
return d.toLocaleDateString(locale || undefined, { day: 'numeric', month: 'short' })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user