fix: DateField — make the whole input clickable, not just the calendar icon #42
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
In the Add Expense and Edit Expense screens, only the trailing calendar icon inside
DateFieldopens the date picker. The rest of the input row (the date text + the surroundingOutlinedTextFieldlook) is dead space — tapping the date text does nothing, which feels broken.This is a follow-up to #27, which added the calendar icon but left the rest of the row non-clickable.
Repro
Expected
The entire
DateFieldrow is clickable, and tapping anywhere on it (label, text, or icon) opens the date picker. The visual affordance should make the whole field look like a single tappable input.Implementation hint
Wrap the field contents in a
BoxwithModifier.clickable { showDatePicker = true }, and passenabled = false/readOnly = trueto the underlyingOutlinedTextFieldso the soft keyboard does not pop up on tap. TheshowDatePickerstate andDatePickerDialogalready exist from #27.Scope
DateFieldis the single source of truth for date entry in the app — fix the composable and bothAddEditExpenseScreenandAddEditRecurringScreenbenefit automatically.