Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

fix(trips): stop the two date fields overlapping in the trip dialog

Maurice755e9f1ca459
diff --git a/client/src/components/Trips/TripFormModal.tsx b/client/src/components/Trips/TripFormModal.tsx
index 228e97d76..5b954eaa1 100644
--- a/client/src/components/Trips/TripFormModal.tsx
+++ b/client/src/components/Trips/TripFormModal.tsx
@@ -534,14 +534,17 @@ export default function TripFormModal({ isOpen, onClose, onSave, trip, onCoverUp
<div className={panelCls}>
+ {/* min-w-0 on both cells: a grid item defaults to min-width:auto, so a
+ long date ("12. Sept. 2026" and the keyboard button beside it) pushed
+ the cell past its track and the two columns overlapped (#2267). */}
<div className="grid grid-cols-2 gap-3">
- <div>
+ <div className="min-w-0">
<label className={labelCls}>
<Calendar className="w-3.5 h-3.5" />{t('dashboard.startDate')}
</label>
<CustomDatePicker value={formData.start_date} onChange={v => update('start_date', v)} placeholder={t('dashboard.startDate')} />
</div>
- <div>
+ <div className="min-w-0">
<label className={labelCls}>
<Calendar className="w-3.5 h-3.5" />{t('dashboard.endDate')}
</label>
diff --git a/client/src/components/shared/CustomDateTimePicker.tsx b/client/src/components/shared/CustomDateTimePicker.tsx
index e0497fbe5..2c8436b23 100644
--- a/client/src/components/shared/CustomDateTimePicker.tsx
+++ b/client/src/components/shared/CustomDateTimePicker.tsx
@@ -304,6 +304,11 @@ export function CustomDatePicker({
aria-haspopup="dialog"
style={{
flex: 1,
+ // Without this the trigger never goes below its text width, so the
+ // ellipsis on the label below is unreachable and the button
+ // overflows its column instead. A long locale date ("12. Sept.
+ // 2026") in a two-column grid is exactly that case (#2267).
+ minWidth: 0,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',