please add minDate & maxDate option
Closed this issue · 5 comments
Is your feature request related to a problem? Please describe.
Yes, I need to set min & max dates to show in the list, not confused with currentDate
. For example, I want today must be the max date, thus user can only scroll to past dates and prevent user from selecting future dates.
Describe the solution you'd like
Please add minDate
and maxdate
in the constructor as optional.
Describe alternatives you've considered
Or maybe as an alternative also add type
with value "future" (calendar will show current & future dates) or "past" (calendar will show current & past dates).
Additional context
Nothing.
Hi, I don't understand the issue you are having. You can already set a max date by passing daysCount to constructor. and currentDate is always the starting point.
Hi, I don't understand the issue you are having. You can already set a max date by passing daysCount to constructor. and currentDate is always the starting point.
That's the issue. currentDate
is represent to selected date, right? So it should not the starting point. Let say currentDate
in the constructor is set to DateTime.now()
, but I want users be able scroll to the past dates like yesterday and more (and not tomorrow or future, because I want today is end point). Maybe add daysPastCount
option, please.
Or would you give me code example to achieve my purpose?
I would like this too? How is it possible to select past dates?
I did fork this repo for that purpose. I have better version included in my app, but I didn't commit it to this fork repo. If you don't mind, here is it:
https://github.com/topex-psy/DatePickerTimelineFlutter
you can download and in the pubspec.yaml
include the folder like below:
date_picker_timeline_custom:
path: library/date_picker_timeline_custom