-
Notifications
You must be signed in to change notification settings - Fork 217
Open
Description
Describe the bug
I am trying to create a calendar, initializing with DateTime.now().add(Duration(days: -7)) , but it is focusing on the first date and not the current date.
Expected behavior
I would like it to start with the current date, with the possibility for the user to select earlier dates by scrolling to the left.
Screenshots
It is initializing this way, with the focus of the dates 7 days ago.
I would like it to initialize with the focus on DateTime.now()
DatePicker(
DateTime.now().add(Duration(days: -7)),
locale: 'pt_BR',
initialSelectedDate: DateTime.now(),
selectionColor: Colors.black,
selectedTextColor: Colors.white,
controller: _controller,
onDateChange: (date) {
setState(() {
_selectDate = date;
});
},
),
Metadata
Metadata
Assignees
Labels
No labels


