I want to customize DateRangePicker
in flutter, How can I change the following elements?
- Change the
Save
button to image. - Remove the
Switch to input
button. - Change the
header background
color. - Change
day name
color. - Change
background
color. - Change
selected item indicator
color. - Change
selected item text
color. - Change
selected range indicator
color. - Change
selected range text
color.
showDateRangePicker(
context: context,
firstDate: DateTime.now(),
lastDate: DateTime.now().add(Duration(days: 100)),
builder: (BuildContext context, Widget child) {
return Theme(
data: ThemeData(
...
),
child: child,
);
},
);
@Michael Feinstein is right - to elaborate a little bit on what you have to do:
_CalendarRangePickerDialog
and change what you need. For your 6-9 look at_buildDayItem
in the range picker file and the other 2 are also easy to find :-)Now you are all set and good to go.