aleksanderwozniak / table_calendar

Highly customizable, feature-packed calendar widget for Flutter
Apache License 2.0
1.84k stars 1k forks source link

Calendar_style TextFormatter dayTextFormatter more details #893

Closed Quardah closed 1 month ago

Quardah commented 2 months ago

In the code for calendar_style.dart we see the following statement to try setting up dayTextFormatter:

/// Use to customize the text within each day cell. /// Defaults to '${date.day}', to show just the day number. /// /// Example usage: /// dart /// dayTextFormatter: (date, locale) => DateFormat.d(locale).format(date), /// final TextFormatter? dayTextFormatter;

I am unable to get it to work, i would like to ask for more details. I am new to this.

What i am trying to do is have the date displayed on the top left corner of the cell and have the center of the cell displaying a letter chosen by the user. I do have the intl package imported

import 'package:intl/intl.dart';

Thank you.