Articles in this section
Category / Section

How to use Hijri date range picker (SfHijriDateRangePicker) in Flutter

In the Flutter date range picker, you can add the Hijri date picker by using the SfHijriDateRangePicker widget.

import 'package:flutter/material.dart';
import 'package:syncfusion_flutter_datepicker/datepicker.dart';
 
void main() => runApp(HijriDatePicker());
 
class HijriDatePicker extends StatelessWidget {
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: SafeArea(
          child: Card(
            margin: const EdgeInsets.fromLTRB(50, 200, 50, 200),
            child: SfHijriDateRangePicker(
              view: HijriDatePickerView.month,
              selectionMode: DateRangePickerSelectionMode.multiple,
              selectionShape: DateRangePickerSelectionShape.rectangle,
              showNavigationArrow: true,
              selectionColor: Colors.indigoAccent,
              monthViewSettings: HijriDatePickerMonthViewSettings(
                  dayFormat: 'EEE',
                  viewHeaderStyle: DateRangePickerViewHeaderStyle(backgroundColor: Colors.tealAccent)),
              headerStyle:
                  DateRangePickerHeaderStyle(backgroundColor: Colors.teal),
            ),
          ),
        ),
      ),
    );
  }
}

View the Github Sample here.

 

hijri calendar

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied