Flutter - Change the font of the date picker in the SfCalender

141 views Asked by At

I'm creating a flutter app that uses the SfCalendar widget. I have set showDatePickerButton: true. I'm trying to change the font family of all the text is my app. I've set the default theme in the MaterialApp to use the new font. I've also wrapped the SfCalendar in an SfCalendarTheme widget like so.

child: SfCalendarTheme(
  data: SfCalendarThemeData(
    headerTextStyle: Theme.of(context).textTheme.bodyMedium,
    activeDatesTextStyle: Theme.of(context).textTheme.bodyMedium,
    viewHeaderDayTextStyle: Theme.of(context).textTheme.bodyMedium,
  ),
  child: SfCalendar(
    view: CalendarView.month,
    showDatePickerButton: true,
    // more code here ...
  ),
),

However, there are still a few spots in the date picker where I can't seem to alter the font. I included a screenshot for reference. I made the new font cursive to make it easier to see. I tried following this post for updating the font of a stand alone date picker, with no success.

SfCalendar with the new font family

SfCalendar date picker with some of the text using the original font family

0

There are 0 answers