Skip to content

Commit

Permalink
5.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Macacoazul01 committed Aug 20, 2024
1 parent 3e59330 commit 6a659b3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 5.1.2 - 2024-08-20
- Fixed [#104](https://github.com/Macacoazul01/month_picker_dialog/issues/104).

## 5.1.1 - 2024-08-19
- Fixed [#105](https://github.com/Macacoazul01/month_picker_dialog/issues/105).

Expand Down
4 changes: 2 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ class _MyAppState extends State<MyApp> {
context: contexto,
firstDate: DateTime(DateTime.now().year - 5, 5),
lastDate: DateTime(DateTime.now().year + 8, 9),
initialRangeDate: DateTime(DateTime.now().year, 5),
endRangeDate: DateTime(DateTime.now().year, 7),
initialRangeDate: DateTime(DateTime.now().year - 1, 5),
endRangeDate: DateTime(DateTime.now().year - 1, 7),
confirmWidget: Text(
'This one!',
style: TextStyle(
Expand Down
2 changes: 1 addition & 1 deletion lib/src/helpers/controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class MonthpickerController {

///Function to initialize the controller when the dialog is created.
void initialize() {
selectedDate = (initialDate ?? now).firstDayOfMonth()!;
selectedDate = (initialRangeDate ?? initialDate ?? now).firstDayOfMonth()!;
if (firstDate != null) {
localFirstDate = DateTime(firstDate!.year, firstDate!.month);
}
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: month_picker_dialog
description: Internationalized dialog for picking a single month from an infinite list of years.
version: 5.1.1
version: 5.1.2
homepage: https://github.com/hmkrivoj/month_picker_dialog

environment:
Expand Down

0 comments on commit 6a659b3

Please sign in to comment.