yearCellStyle property

DateRangePickerYearCellStyle yearCellStyle
final

The style have properties which allow to customize the year, decade and century view of the SfDateRangePicker.

Allows to customize the DateRangePickerYearCellStyle.textStyle, DateRangePickerYearCellStyle.todayTextStyle, DateRangePickerYearCellStyle.leadingDatesTextStyle, DateRangePickerYearCellStyle.disabledDatesTextStyle, DateRangePickerYearCellStyle.cellDecoration, DateRangePickerYearCellStyle.todayCellDecoration, DateRangePickerYearCellStyle.leadingDatesDecoration and DateRangePickerYearCellStyle.disabledDatesDecoration in year, decade and century view of the date range picker.

See also:


Widget build(BuildContext context) {
   return MaterialApp(
     home: Scaffold(
       body: SfDateRangePicker(
         view: DateRangePickerView.decade,
         enablePastDates: false,
         yearCellStyle: DateRangePickerYearCellStyle(
           textStyle: TextStyle(
               fontWeight: FontWeight.w400, fontSize: 15,
                    color: Colors.black),
           todayTextStyle: TextStyle(
               fontStyle: FontStyle.italic,
               fontSize: 15,
               fontWeight: FontWeight.w500,
               color: Colors.red),
           leadingDatesDecoration: BoxDecoration(
               color: const Color(0xFFDFDFDF),
               border: Border.all(color: const Color(0xFFB6B6B6),
                    width: 1),
               shape: BoxShape.circle),
           disabledDatesDecoration: BoxDecoration(
               color: const Color(0xFFDFDFDF).withOpacity(0.2),
               border: Border.all(color: const Color(0xFFB6B6B6),
                    width: 1),
               shape: BoxShape.circle),
         ),
       ),
     ),
   );
 }

Implementation

final DateRangePickerYearCellStyle yearCellStyle;