I want to select multiple dates from date picker (not range). Actually in my app I have added a workshop that will be hosted on multiple days, like 1 June, 7 June, 9 June. So i want to add add multiple dates. Is there a option to select multiple dates in date picker?
3 Answers
Try to refer table_calendar package and daterangepicker use syncfusion_flutter_datepicker package for that hope its help to you.
2 Comments
Muhammad Shafique
I think 1st will do it. Thank you
anqit
it should be noted that the sync fusion date range picker is a commercial package
If someone else is looking for this question it is best to use showDateRangePicker()
you can use it like this
DateTimeRange? result = await showDateRangePicker(
context: context,
firstDate: DateTime(2022, 1, 1), // the earliest allowable
lastDate: DateTime(2030, 12, 31), // the latest allowable
currentDate: DateTime.now(),
saveText: 'Done',
);
1 Comment
gsharew
Greate, much interesting.
Use syncfusion_flutter_datepicker 20.4.42 plugin
SfDateRangePicker(
view: DateRangePickerView.month,
monthViewSettings: DateRangePickerMonthViewSettings(firstDayOfWeek: 6),
selectionMode: DateRangePickerSelectionMode.multiple,
showActionButtons: true,
onSubmit: ( val) {
print(val);
},
onCancel: (){
_datePickerController.selectedRanges = null;
}
),
1 Comment
Community
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.