Skip to content

Year picker support #39961

@serendipity1004

Description

@serendipity1004

Currently showDatePicker only allows users to pick a full date e.g. year, month and day. However, sometimes you want to enforce that users only pick specific sections of date for example just year. I know year picker is available as a widget right now but there is no explanation on how to use this solely in showDatePicker.

I think it would be very useful if we can specify what part of date we want users to pick. Maybe something like

DatePick.year
DatePick.yearAndMonth
DatePick.all

meanwhile, it would be great if anyone could provide example on just using year picker and getting year input only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: new featureNothing broken; request for a new capabilityf: 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