DeKekem
DeKekem

Reputation: 1743

Get weekday format right with syncfusion_flutter_datepicker flutter

How do I get the one letter weekday in flutter with syncfusion_flutter_datepicker? This is my code:

    SfDateRangePicker(
      backgroundColor: Colors.white,
      selectionColor: primaryColor,
      selectionMode: DateRangePickerSelectionMode.single,
      minDate: DateTime.now(),
      headerStyle: DateRangePickerHeaderStyle(
        backgroundColor: Colors.white,
        textStyle: _textStyle(FontWeight.w600, size20),
      ),
      monthViewSettings: DateRangePickerMonthViewSettings(
        firstDayOfWeek: 1,
        dayFormat: 'E',
        viewHeaderStyle: DateRangePickerViewHeaderStyle(
          textStyle: _textStyle(FontWeight.w500, size16),
        ),
      ),
      monthCellStyle: DateRangePickerMonthCellStyle(
        disabledDatesTextStyle: _textStyle(FontWeight.w500, size16),
        todayTextStyle: _textStyle(FontWeight.w500, size16),
        textStyle: _textStyle(FontWeight.w500, size16),
      ),
      selectionTextStyle: _textStyle(FontWeight.w500, size16),
    ),

it works with english as locale but not with french. In french I get LUN., MAR. etc. I also tried initializeDateFormatting without success.

Upvotes: 0

Views: 77

Answers (0)

Related Questions