Enable previous month
Closed this issue · 3 comments
snehamadda commented
Enable previous month
Can you add a feature to Enable the previous month, that would be a great help?
The solution you'd like
If you can give numberOfPreviousMonths
as an option It is very useful to enable previous months too. If you can add a feature to Enable the previous month, that would be a great help?
chrisvidal commented
should be able to do something like that:
DatePicker(
DateTime.now().sub(Duration(days: 31)),
initialSelectedDate: DateTime.now(),
selectionColor: Colors.black,
selectedTextColor: Colors.white,
daysCount: 31,
controller: _datePickercontroller,
onDateChange: (date) {
// New date selected
},
ajinzrathod commented
It shows
The method 'sub' isn't defined for the type 'DateTime'.
How do I Solve this?
federico2390 commented
@ajinzrathod is substract but don't work as u mean