From 5af10f15deae42981ece28a8c075e4376501f34b Mon Sep 17 00:00:00 2001 From: albertoaliberti <100307168+albertoaliberti@users.noreply.github.com> Date: Wed, 29 Jan 2025 18:27:21 +0100 Subject: [PATCH 1/2] fix: DatePicker endDate unexpected behaviour #1170 when localDate.year == endDate.year, the months to be returned should be from January to endDate.month, not from endDate.month to December --- lib/src/controls/form/pickers/date_picker.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/controls/form/pickers/date_picker.dart b/lib/src/controls/form/pickers/date_picker.dart index f1bcba340..b855e7f02 100644 --- a/lib/src/controls/form/pickers/date_picker.dart +++ b/lib/src/controls/form/pickers/date_picker.dart @@ -18,7 +18,7 @@ Iterable _monthsInYear( yield current; } } else if (localDate.year == endDate.year) { - for (var current = endDate.month; current <= 12; current++) { + for (var current = 1; current <= endDate.month; current++) { yield current; } } else { From d4cfc2167c57da8b75b52e121d31a17e24980b1a Mon Sep 17 00:00:00 2001 From: albertoaliberti <100307168+albertoaliberti@users.noreply.github.com> Date: Wed, 29 Jan 2025 18:38:01 +0100 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ef1c5a28..a1cf40a65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## [next] +- fix: DatePicker selectable range matches the one beetween startDate and endDate [#1170](https://github.com/bdlukaa/fluent_ui/issues/1170) - fix: hide Tab's close button when `onClosed` is null - feat: Add `TextBox.cursorOpacityAnimates` (defaults to `FluentThemeData.cursorOpacityAnimates`, which defaults to `false`); default setting improves CPU/GPU efficiency while TextBox has focus ([#1164](https://github.com/bdlukaa/fluent_ui/issues/1164))