Skip to content

add initialDate to MacosDatePicker #310

@Luckey-Elijah

Description

@Luckey-Elijah

Use case

I'd like to control the initial date set in MacosDatePicker widget.

Proposal

Create a parameter initialDate that sets _MacosDatePickerState._initialDate on init state. If the value of the parameter initialDate is null, then use DateTime.now().

Example of ideal usage:

MacosDatePicker(
  style: DatePickerStyle.textual,
  initialDate: DateTime(2022, 10, 10),
  onDateChanged: _onDateChanged,
)

Metadata

Metadata

Assignees

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