Skip to content

showDatePicker - expose callback or change notifier when user changes entry mode (calendar / input) #113423

@mikeesouth

Description

@mikeesouth

Use case

I'm using showDatePicker() to let users select dates in my application when they create objects, sometimes they create 20+ objects in a go and choose a date for each. The date picker allows us to set initial entry mode, like this: initialEntryMode: DatePickerEntryMode.input (input or calendar) and that's great. For most users I want "calendar" entry mode so I choose that as default. But if a user prefers input mode, then he/she creates the first object and switches from calendar entry mode to input entry mode by clicking the pen symbol.
image

Then enters a date, closes the date picker and creates the object. Then opens next object and again - it's in calendar mode. Click pen, enter date, save object, create next - again in calendar mode.

A workaround would be to expose this setting to the user: What's your preferred way to select dates, calendar or input? but that's too specific for my application and I personally appreciate applications that remembers my choices rather than forcing me to configure every setting in detail.

Proposal

Expose a callback or change notifier when the user switches between entry mode calendar and input, this way we can store the preferred input method in application state and open the next date picker with the preferred entry mode already set (using the existing initialEntryMode parameter).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterf: date/time pickerDate or time picker widgetsf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions