DateField: replace "Pick" button with a trailing calendar icon #27

Closed
opened 2026-06-28 13:41:27 +00:00 by admin · 0 comments
Owner

Bug / UX

DateField currently exposes the date picker via a trailing TextButton with the literal label "Pick" (app/src/main/java/dev/achmad/ledgerr/ui/components/DateField.kt:40-44):

trailingIcon = {
    TextButton(onClick = { showPicker = true }) {
        Text(text = stringResource(R.string.action_pick))
    }
},

Expected behavior

The trailing slot should be a tappable calendar icon at the far right of the field, consistent with Material 3 outlined text fields elsewhere in the app. The entire field (including the icon) should open the picker on tap — but minimally the icon must be tappable.

Acceptance criteria

  • DateField's trailingIcon is an IconButton (or Icon wrapped in a clickable surface) using a Calendar / CalendarMonth / DateRange outlined icon from androidx.compose.material.icons.outlined.*.
  • The icon is positioned at the far right of the OutlinedTextField.
  • Tapping the icon (or the field itself) opens the DatePickerDialog.
  • The R.string.action_pick string and TextButton import in this file are removed if no longer used.
  • The dialog confirm / cancel flow is unchanged.
**Bug / UX** `DateField` currently exposes the date picker via a trailing `TextButton` with the literal label "Pick" (`app/src/main/java/dev/achmad/ledgerr/ui/components/DateField.kt:40-44`): ```kotlin trailingIcon = { TextButton(onClick = { showPicker = true }) { Text(text = stringResource(R.string.action_pick)) } }, ``` **Expected behavior** The trailing slot should be a tappable **calendar icon** at the far right of the field, consistent with Material 3 outlined text fields elsewhere in the app. The entire field (including the icon) should open the picker on tap — but minimally the icon must be tappable. **Acceptance criteria** - `DateField`'s `trailingIcon` is an `IconButton` (or `Icon` wrapped in a clickable surface) using a `Calendar` / `CalendarMonth` / `DateRange` outlined icon from `androidx.compose.material.icons.outlined.*`. - The icon is positioned at the far right of the `OutlinedTextField`. - Tapping the icon (or the field itself) opens the `DatePickerDialog`. - The `R.string.action_pick` string and `TextButton` import in this file are removed if no longer used. - The dialog confirm / cancel flow is unchanged.
admin closed this issue 2026-06-28 14:32:57 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/ledgerr#27