You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Flutter/DateRangePicker/Callbacks.md
+37-34Lines changed: 37 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,27 +8,29 @@ documentation: ug
8
8
---
9
9
10
10
# Callbacks in Flutter Date Range Picker (SfDateRangePicker)
11
-
Calendar supports the `ViewChangedCallback` and `SelectionChangedCallback` to interact with the Flutter date range picker.
11
+
12
+
Calendar supports the [ViewChangedCallback](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/DateRangePickerViewChangedCallback.html) and [SelectionChangedCallback](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/DateRangePickerSelectionChangedCallback.html) to interact with the Flutter date range picker.
12
13
13
14
## View changed callback
15
+
14
16
The [onViewChanged](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/SfDateRangePicker/onViewChanged.html) callback triggers when the current view swiped to previous or next view, picker view switched to another picker view.
15
17
16
-
*`visibleDateRange` - returns the start and end dates of the current visible month.
18
+
*[visibleDateRange](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/DateRangePickerViewChangedArgs/visibleDateRange.html) - returns the start and end dates of the current visible month.
* Use [HijriDatePickerViewChangedArgs](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/HijriDatePickerViewChangedArgs-class.html) for the [SfHijriDateRangePicker](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/SfHijriDateRangePicker-class.html).
38
40
39
41
## Selection changed callback
42
+
40
43
The [onSelectionChanged](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/SfDateRangePicker/onSelectionChanged.html) callback triggers when selecting the dates from the date picker.
41
44
42
45
*`args.value` - returns the dates based on the selection mode.
Copy file name to clipboardExpand all lines: Flutter/DateRangePicker/accessibility.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ documentation: ug
10
10
# Accessibility in Flutter DateRangePicker (SfDateRangePicker)
11
11
12
12
## Screen reader support
13
-
The `SfDateRangePicker` can easily be accessed by screen readers. Please find the following table to get spoken feedback about the inner element contents of the screen.
13
+
The [SfDateRangePicker](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/SfDateRangePicker-class.html) can easily be accessed by screen readers. Please find the following table to get spoken feedback about the inner element contents of the screen.
14
14
15
15
### Month view
16
16
@@ -56,7 +56,7 @@ The `SfDateRangePicker` can easily be accessed by screen readers. Please find th
56
56
57
57
## Sufficient contrast
58
58
59
-
The `SfDateRangePicker`[theming](https://help.syncfusion.com/flutter/themes) support offers a consistent and standardized look, as well as the ability to set the colors for all the UI elements.
59
+
The [SfDateRangePicker](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/SfDateRangePicker-class.html)[theming](https://help.syncfusion.com/flutter/themes) support offers a consistent and standardized look, as well as the ability to set the colors for all the UI elements.
60
60
61
61
The following APIs allows you to customize the colors of the following elements.
@@ -75,7 +75,7 @@ The following APIs allows you to customize the colors of the following elements.
75
75
76
76
## Large fonts
77
77
78
-
The `SfDateRangePicker` font size can be adjusted automatically based on device settings and the font size scaled based on the `MediaQueryData.textScaleFactor`. It also allows you to change the font size of all elements in date range picker.
78
+
The [SfDateRangePicker](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/SfDateRangePicker-class.html) font size can be adjusted automatically based on device settings and the font size scaled based on the [MediaQueryData.textScaleFactor](https://api.flutter.dev/flutter/widgets/MediaQueryData/textScaleFactor.html). It also allows you to change the font size of all elements in date range picker.
@@ -89,7 +89,7 @@ The `SfDateRangePicker` font size can be adjusted automatically based on device
89
89
90
90
## Keyboard navigation
91
91
92
-
The following keyboard interactions are supported by the `SfDateRangePicker`.
92
+
The following keyboard interactions are supported by the [SfDateRangePicker](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/SfDateRangePicker-class.html).
Copy file name to clipboardExpand all lines: Flutter/DateRangePicker/builders.md
+50-56Lines changed: 50 additions & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,11 @@ control: SfDateRangePicker
7
7
documentation: ug
8
8
---
9
9
# Builders in Flutter Date Range Picker (SfDateRangePicker)
10
+
10
11
The date range picker allows you to create a responsive UI with the conditions based on a widget’s details, and to design and create your custom view to the month cells and year cells in the date range picker.
11
12
12
13
## Cell builder
14
+
13
15
The [DateRangePickerCellBuilder](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/DateRangePickerCellBuilder.html) allows you to design your custom view and assign the view to the month and year view cells of the date range picker by returning an appropriate widget in the [cellBuilder](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/SfDateRangePicker/cellBuilder.html) of [SfDateRangePicker](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/SfDateRangePicker-class.html).
14
16
15
17
[DateRangePickerCellDetails](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/DateRangePickerCellDetails-class.html): Returns the details of the cell.
@@ -29,63 +31,56 @@ class MyAppState extends State<MyApp> {
final bool isToday = isSameDate(details.date, DateTime.now());
38
-
final bool isBlackOut = isBlackedDate(details.date);
39
-
final bool isSpecialDate = isSpecialDay(details.date);
40
-
return Container(
41
-
margin: EdgeInsets.all(2),
42
-
padding: EdgeInsets.only(top: 10),
43
-
decoration: BoxDecoration(
34
+
body: SafeArea(
35
+
child: SfDateRangePicker(
36
+
controller: _controller,
37
+
cellBuilder: (
38
+
BuildContext context,
39
+
DateRangePickerCellDetails details,
40
+
) {
41
+
final bool isToday = isSameDate(details.date, DateTime.now());
42
+
final bool isBlackOut = isBlackedDate(details.date);
43
+
final bool isSpecialDate = isSpecialDay(details.date);
44
+
return Container(
45
+
margin: EdgeInsets.all(2),
46
+
padding: EdgeInsets.only(top: 10),
47
+
decoration: BoxDecoration(
44
48
color: Colors.blueAccent,
45
-
border: isToday
46
-
? Border.all(color: Colors.black, width: 2)
47
-
: null),
48
-
child: Column(
49
-
mainAxisSize: MainAxisSize.max,
50
-
mainAxisAlignment: MainAxisAlignment.spaceAround,
51
-
children: <Widget>[
52
-
Text(
53
-
details.date.day.toString(),
54
-
style: TextStyle(
55
-
fontSize: 13,
56
-
fontWeight: FontWeight.bold,
49
+
border:
50
+
isToday
51
+
? Border.all(color: Colors.black, width: 2)
52
+
: null,
53
+
),
54
+
child: Column(
55
+
mainAxisSize: MainAxisSize.max,
56
+
mainAxisAlignment: MainAxisAlignment.spaceAround,
57
+
children: <Widget>[
58
+
Text(
59
+
details.date.day.toString(),
60
+
style: TextStyle(
61
+
fontSize: 13,
62
+
fontWeight: FontWeight.bold,
63
+
),
57
64
),
58
-
),
59
-
isBlackOut
60
-
? Icon(
61
-
Icons.block_sharp,
62
-
size: 13,
65
+
isBlackOut
66
+
? Icon(Icons.block_sharp, size: 13)
67
+
: isSpecialDate
68
+
? Row(
69
+
mainAxisAlignment: MainAxisAlignment.center,
70
+
children: [
71
+
Icon(Icons.cake, size: 13),
72
+
Icon(Icons.celebration, size: 13),
73
+
Icon(Icons.audiotrack, size: 13),
74
+
],
63
75
)
64
-
: isSpecialDate
65
-
? Row(
66
-
mainAxisAlignment: MainAxisAlignment.center,
67
-
children: [
68
-
Icon(
69
-
Icons.cake,
70
-
size: 13,
71
-
),
72
-
Icon(
73
-
Icons.celebration,
74
-
size: 13,
75
-
),
76
-
Icon(
77
-
Icons.audiotrack,
78
-
size: 13,
79
-
)
80
-
],
81
-
)
82
-
: Container()
83
-
],
84
-
),
85
-
);
86
-
},
76
+
: Container(),
77
+
],
78
+
),
79
+
);
80
+
},
81
+
),
87
82
),
88
-
)),
83
+
),
89
84
);
90
85
}
91
86
@@ -114,18 +109,17 @@ class MyAppState extends State<MyApp> {
114
109
}
115
110
}
116
111
117
-
118
112
{% endhighlight %}
119
113
{% endtabs %}
120
114
121
115

122
116
123
117
>**NOTE**
124
-
* Use [HijriDateRangePickerCellDetails]() for the [SfHijriDateRangePicker](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/SfHijriDateRangePicker-class.html).
118
+
* Use [HijriDateRangePickerCellDetails](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/HijriDateRangePickerCellDetails-class.html) for the [SfHijriDateRangePicker](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/SfHijriDateRangePicker-class.html).
125
119
126
120
127
121
## See also
128
122
129
123
*[How to customize the date range picker cells using builder in the Flutter (SfDateRangePicker)](https://support.syncfusion.com/kb/article/10711/how-to-customize-the-date-range-picker-cells-using-builder-in-the-flutter-sfdaterangepicker)
130
124
*[How to create timeline Date Picker in Flutter](https://support.syncfusion.com/kb/article/10992/how-to-create-timeline-date-picker-in-flutter)
131
-
*[How to customize the special dates using builder in the Flutter Date Range Picker](https://support.syncfusion.com/kb/article/10750/how-to-customize-the-special-dates-using-builder-in-the-flutter-date-range-picker)
125
+
*[How to customize the special dates using builder in the Flutter Date Range Picker](https://support.syncfusion.com/kb/article/10750/how-to-customize-the-special-dates-using-builder-in-the-flutter-date-range-picker)
0 commit comments