skip to Main Content

enter image description here

I want to make the background color of the date options when active to be centered. How can I do this?

Note: I am using SDK version 2.12 and syncfusion_flutter_datepicker version 20.3.61

enter image description here

Just like this.

Thanks…

2

Answers


  1. You can use this package to solve this issues
    Link: calendar_date_picker

    Login or Signup to reply.
  2. You can use this to solve this issues

    
    import 'package:flutter/material.dart';
    
    import 'package:syncfusion_flutter_datepicker/datepicker.dart';
    
    void main() => runApp(MyApp());
    
    class MyApp extends StatelessWidget {
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          home: Scaffold(
            body: Center(
              child: SfDateRangePicker(
                view: DateRangePickerView.month,
                monthCellStyle: DateRangePickerMonthCellStyle(
                  activeDatesTextStyle: TextStyle(
                    backgroundColor: Colors.blue,
                    textAlign: TextAlign.center, // Align the text to the center
                  ),
                ),
              ),
            ),
          ),
        );
      }
    }
    
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search