Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## [1.12.4]
* Default the `_selectedDay` state variable to be 1 when selecting the previous/next month from widget to ensure new date is valid for `_formatAsDateTime()` method (https://github.com/flutter/flutter/issues/123669 & https://github.com/macosui/macos_ui/pull/402)

## [1.12.3]
* Added support for `routerConfig` to `MacosApp.router`. ([#388](https://github.com/macosui/macos_ui/issues/388))

Expand Down
12 changes: 10 additions & 2 deletions lib/src/selectors/date_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,13 @@ class _MacosDatePickerState extends State<MacosDatePicker> {
setState(() {
_selectedYear--;
_selectedMonth = 12;
_selectedDay = 1;
});
} else {
setState(() => _selectedMonth--);
setState(() {
_selectedMonth--;
_selectedDay = 1;
});
}
widget.onDateChanged.call(_formatAsDateTime());
},
Expand Down Expand Up @@ -397,9 +401,13 @@ class _MacosDatePickerState extends State<MacosDatePicker> {
setState(() {
_selectedYear++;
_selectedMonth = 1;
_selectedDay = 1;
});
} else {
setState(() => _selectedMonth++);
setState(() {
_selectedMonth++;
_selectedDay = 1;
});
}

widget.onDateChanged.call(_formatAsDateTime());
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: macos_ui
description: Flutter widgets and themes implementing the current macOS design language.
version: 1.12.3
version: 1.12.4
homepage: "https://macosui.dev"
repository: "https://github.com/GroovinChip/macos_ui"

Expand Down