Skip to content

Commit 89f2719

Browse files
authored
Fix inactive (disabled) days being clickable (#389)
Inactive days were still clickable, despite being disabled. They had an InkWell (Material Ripple) animation as well This PR fixes this
1 parent 3857ae8 commit 89f2719

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/flutter_calendar_carousel.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,9 @@ class _CalendarState<T extends EventInterface>
528528
: widget.dayButtonColor,
529529
padding: EdgeInsets.all(widget.dayPadding),
530530
),
531-
onPressed: widget.disableDayPressed ? null : () => _onDayPressed(now),
531+
onPressed: widget.disableDayPressed || !isSelectable
532+
? null
533+
: () => _onDayPressed(now),
532534
child: Stack(
533535
children: widget.showIconBehindDayText
534536
? <Widget>[

0 commit comments

Comments
 (0)