Articles in this section
Category / Section

How to deselect the selected date in the Flutter Date Range Picker (SfDateRangePicker)

1 min read

In the Flutter date range picker, you can de select the selected date by using the property of toggleDaySelection in date range picker.

Set the toggleDaySelection value as true for deselecting the selected date.

import 'package:flutter/material.dart';
import 'package:syncfusion_flutter_datepicker/datepicker.dart';
 
void main() => runApp(DeSelection());
 
class DeSelection extends StatelessWidget {
 
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
          body: Card(
            margin: const EdgeInsets.fromLTRB(50, 150, 50, 150),
            child: SfDateRangePicker(
              view: DateRangePickerView.month,
              toggleDaySelection: true,
            ),
          )
      ),
    );
  }
}

View sample in GitHub

deselection gif

 

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