Repository navigation
Closed
flutter/packages
#12587Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Description
Good morning,
actually our team is facing a problem with Flutter calendar widget.
There is no possibility to change the template of calendar days when using showDatePicker().
The idea is to have 1 new function in the showDatePicker() definition that is called when widget is showed in order to have the possibility to define the day template, something like:
final DateTime picked = await showDatePicker(
context: context,
locale: const Locale("it", "IT"),
initialDate: _selectedDate,
firstDate: DateTime.now(),
lastDate: DateTime(2101),
selectableDayPredicate: (date) {
// If not Sunday or Saturday return day as clicable
if (date.weekday != 6 && date.weekday != 7) {
return true;
}
return false;
},
//New function called during single day widget build
dayTemplateBuilder: (date) {
//... my custom logic
return BoxDecoration(); //Decoration();
}
);With this implementation Flutter users can simply customize this widget for example to highlight days in which there are some appointments.
Thanks
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Activity
HansMuller commentedon Oct 15, 2020
CC @darrenaustin
enricobenedos commentedon Sep 28, 2021
Hello @HansMuller,
is there any update about this feature? I say that it has not too much priority.
darrenaustin commentedon Oct 4, 2021
@enricobenedos, sorry we haven't had the chance to really evaluate this. It seems like a reasonable request, but would need some design. Should this builder function only create a decoration for the date, or should it include the text as well? If it is just the decoration, then there might be color contrast issues with the text on whatever background the decoration has. There might also be issues with highlights or other effects when the date is selected. It would also need to handle the highlighting focus for keyboard navigation.
This is probably not going to be investigated right now, as we have other higher priority tasks. If we get enough feedback about this, we can take another look. Also, if someone if willing to put in the work to open a pull request that adds such a feature we would be more than happy to review it.
awatson32 commentedon Sep 26, 2022
Was searching for ways to customize the allowable/selectable days in the CalendarDatePicker. Right now, if the date has appointments available, we had feedback that the contrast to that of the non available days is not enough.

Kitamura-Hisao commentedon Aug 20, 2026
I’m interested in working on this issue.
I’m considering adding dayBuilder and weekdayBuilder APIs so that individual date cells and weekday headers can be customized while still allowing callers to reuse the default child widget.
Proposed signatures:
The idea is to pass the default child to the builder, allowing callers to customize the presentation without having to recreate the default date or weekday content.
Would this direction be acceptable?
Also, should weekday customization be included in the same change, or handled separately?
[material_ui] Add day and weekday builders to CalendarDatePicker and …
github-actions commentedon Nov 5, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.