iamvivekkaushik / DatePickerTimelineFlutter

Flutter Date Picker Library that provides a calendar as a horizontal timeline
Apache License 2.0
282 stars 198 forks source link

Can we deactivate all the future dates from next month? #76

Open ziagit opened 1 year ago

ziagit commented 1 year ago

Currently we can deactivate a list of datetimes, how can we deactivate all the future dates from next month? How can I achieve it in this plugin? if not possible can you add this feature? Or add an end date to show only 30 days from today.

here is the code.

  List<DateTime> deactivatedDates() {
    return [
      DateTime.now().add(Duration(days: 31)),
      DateTime.now().add(Duration(days: 32)),
      DateTime.now().add(Duration(days: 33)),
      DateTime.now().add(Duration(days: 34)),
      DateTime.now().add(Duration(days: 35)),
...
..
..
    ];
  }

Thanks,

juanpfloreez commented 4 months ago

Hello! is there any update on this request ? is highly important to be able do reactive all future dates.