Skip to content

Commit

Permalink
Merge pull request #170 from theideasaler/release
Browse files Browse the repository at this point in the history
release: v1.0.2
  • Loading branch information
theideasaler authored May 5, 2024
2 parents 5d15522 + a8dd9a8 commit 1004d0c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
## [1.0.2]

- fix: current month & selected validation logics

## [1.0.1]

- doc: update README.md

## [1.0.0]

- BREAKING: feat: add month picker
- **BREAKING**: feat: add month picker
- feat: add `monthBuilder` into config
- feat: add `disableMonthPicker` into config
- feat: add `useAbbrLabelForMonthModePicker` into config
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CalendarDatePicker2

[![Pub Package](https://img.shields.io/badge/pub-v1.0.1-blue)](https://pub.dev/packages/calendar_date_picker2)
[![Pub Package](https://img.shields.io/badge/pub-v1.0.2-blue)](https://pub.dev/packages/calendar_date_picker2)
[![Pub Package](https://img.shields.io/badge/flutter-%3E%3D1.17.0-green)](https://flutter.dev/)
[![GitHub Repo stars](https://img.shields.io/github/stars/theideasaler/calendar_date_picker2?style=social)](https://github.com/theideasaler/calendar_date_picker2)

Expand Down Expand Up @@ -41,7 +41,7 @@ Add the following line to `pubspec.yaml`:

```yaml
dependencies:
calendar_date_picker2: ^1.0.1
calendar_date_picker2: ^1.0.2
```
### Basic setup
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.0.1"
version: "1.0.2"
characters:
dependency: transitive
description:
Expand Down
9 changes: 7 additions & 2 deletions lib/src/widgets/_impl/_month_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,17 @@ class _MonthPickerState extends State<_MonthPicker> {
final ColorScheme colorScheme = Theme.of(context).colorScheme;
final TextTheme textTheme = Theme.of(context).textTheme;
final int month = 1 + index;
final bool isCurrentMonth = month == widget.config.currentDate.month;
final bool isCurrentMonth =
widget.initialMonth.year == widget.config.currentDate.year &&
widget.config.currentDate.month == month;
const double decorationHeight = 36.0;
const double decorationWidth = 72.0;

final bool isSelected = widget.selectedDates.isNotEmpty &&
widget.selectedDates.any((date) => date != null && date.month == month);
widget.selectedDates.any((date) =>
date != null &&
widget.initialMonth.year == date.year &&
date.month == month);
var isMonthSelectable =
widget.initialMonth.year >= widget.config.firstDate.year &&
widget.initialMonth.year <= widget.config.lastDate.year;
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: calendar_date_picker2
description: A lightweight and customizable calendar picker based on Flutter CalendarDatePicker, with support for single date picker, range picker and multi picker.
version: 1.0.1
version: 1.0.2
homepage: https://github.com/theideasaler/calendar_date_picker2

environment:
Expand Down

0 comments on commit 1004d0c

Please sign in to comment.