I created a simple prototype for work to show the benefits of flutter but I did notice the dateRangePicker is opening up to the wrong dates.
onTap: () async {
var result = await showDateRangePicker(
context: context,
firstDate: DateTime.now().subtract(Duration(days:60)),
lastDate: DateTime.now(),
initialEntryMode: DatePickerEntryMode.calendar,
currentDate: DateTime.now(),
initialDateRange: DateTimeRange(
start: DateTime.now(),
end: DateTime.now()
),
);
}
This creates the dialog and modifying the initial range and first/last dates does everything as expected, except when it opens the dialog shows the first months closest to firstDate. It's fine with a few months but at first I set the firstDate to 10 years in the past, and that was quite the scroll to get to the current date:
I created a simple prototype for work to show the benefits of flutter but I did notice the dateRangePicker is opening up to the wrong dates.
This creates the dialog and modifying the initial range and first/last dates does everything as expected, except when it opens the dialog shows the first months closest to firstDate. It's fine with a few months but at first I set the firstDate to 10 years in the past, and that was quite the scroll to get to the current date: