Skip to content

initiate date picker from predefined list#34

Open
3ace wants to merge 1 commit into
iamvivekkaushik:masterfrom
3ace:fromList
Open

initiate date picker from predefined list#34
3ace wants to merge 1 commit into
iamvivekkaushik:masterfrom
3ace:fromList

Conversation

@3ace
Copy link
Copy Markdown
Contributor

@3ace 3ace commented May 18, 2020

this PR will add new constructor to display a predefined list of date.

example:

DatePicker.fromList(
  [
    DateTime(2020, 1, 1),
    DateTime(2020, 2, 1),
    DateTime(2020, 3, 1),
    DateTime(2020, 4, 1),
    DateTime(2020, 5, 1),
    DateTime(2020, 6, 1),
    DateTime(2020, 7, 1),
    DateTime(2020, 8, 1),
    DateTime(2020, 9, 1),
    DateTime(2020, 10, 1),
    DateTime(2020, 11, 1),
    DateTime(2020, 12, 1),
  ],
  width: 60,
  height: 80,
  initialSelectedDate: DateTime(2020, 4, 1),
  selectionColor: Colors.black,
  selectedTextColor: Colors.white,
)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant