Skip to content

[Bug]: Android scheduled task Time picker stays open after tapping OK #40469

Closed

Description

@ruck-syu

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/mobile

Steps to reproduce

  1. On Android, open Settings → Scheduled tasks → New task.
  2. Leave the schedule on At a time and tap Time.
  3. Pick a time (e.g. 14:00) and tap OK.

Expected behavior

The dialog closes and the Time row shows the picked time.

Actual behavior

The time is saved (the row behind the dialog updates), but the dialog stays open, re-seeded with the new value. Tapping OK again does nothing; only Cancel closes it.

On Android, @expo/ui's DateTimePicker shows its dialog for as long as it is mounted, and OK calls onDateSelected only, not onDismissRequest. The At a time picker in apps/mobile/src/features/settings/SettingsScheduledTasksRouteScreen.tsx only unmounts on onDismiss. The Once date/time pickers already close themselves in onValueChange on Android; adding the same if (Platform.OS === "android") setTimePickerOpen(false); to the At-a-time picker fixes it (verified on an Android 16 emulator).

Impact

Minor bug or occasional failure

Version or commit

main @ 1cedd4b

Environment

Android 16 emulator (Pixel, API 36), T3 Code Dev client

Logs or stack traces

Screenshots, recordings, or supporting files

time-picker-before.mp4

Workaround

Tap Cancel after OK. The picked time is kept.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions