datePickerDayOfMonth method
override
Day of month that is shown in CupertinoDatePicker spinner corresponding to the given day index.
If weekDay is provided then it will also show weekday name alongside the numerical day.
Examples: datePickerDayOfMonth(1) in:
-
US English: 1
-
Korean: 1일 Examples: datePickerDayOfMonth(1, 1) in:
-
US English: Mon 1
Implementation
@override
String datePickerDayOfMonth(int dayIndex, [int? weekDay]) {
return weekDay != null
? '${_weekdayFormat.format(DateTime.utc(1, 1, weekDay))} ${_dayFormat.format(DateTime.utc(1, 1, dayIndex))}'
// Year and month doesn't matter since we just want to day formatted.
: _dayFormat.format(DateTime.utc(0, 0, dayIndex));
}