-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
previous days #45
Comments
No, not with the current implementation. |
actually, it is, the initial date you can set as 'DateTime.now().subtract(Duration(days: 30)),' this will show the last month, the initialSelectedDate you set as DateTime.now(), in the jumpToSelection function you add this line _datePickerState._currentDate = DateTime.now(); and add the function to your init state _controller.jumpToSelection(context), its gonna show to last 30 days that you can select but it always gonna start with today selected. |
|
`void jumpToSelection(var context) {
}` |
is it working for you? if yes then what could be inside this method |
Yeah, it's working fine!!
|
Seems strange that it don't have a minimum date and a strange workaround instead .. |
Thanks for the help on this @EduardoAirton! I found that if you don't add WidgetsBinding in initState, you will get the "DatePickerController is not attached to any DatePicker View" assertion error from the jumpToSelection() method because the DatePicker hasn't been added to the widget tree yet.
With null-safety:
|
Is it not possible to add a start and end date? |
Hoping to clarify some of this.
|
Is it possible to implement that we can select the previous days by swiping right?
The text was updated successfully, but these errors were encountered: