diff --git a/lib/src/components/common_components.dart b/lib/src/components/common_components.dart index d0a1d828..227fc001 100644 --- a/lib/src/components/common_components.dart +++ b/lib/src/components/common_components.dart @@ -133,6 +133,7 @@ class DefaultPressDetector extends StatelessWidget { required this.minuteSlotSize, this.onDateTap, this.onDateLongPress, + this.startHour = 0, }); final DateTime date; @@ -142,6 +143,7 @@ class DefaultPressDetector extends StatelessWidget { final MinuteSlotSize minuteSlotSize; final DateTapCallback? onDateTap; final DatePressCallback? onDateLongPress; + final int startHour; @override Widget build(BuildContext context) { @@ -183,7 +185,7 @@ class DefaultPressDetector extends StatelessWidget { date.month, date.day, 0, - (minuteSlotSize.minutes * slot), + (minuteSlotSize.minutes * slot) + (startHour * 60), ); } diff --git a/lib/src/day_view/day_view.dart b/lib/src/day_view/day_view.dart index ece19e73..3b35afdb 100644 --- a/lib/src/day_view/day_view.dart +++ b/lib/src/day_view/day_view.dart @@ -621,6 +621,7 @@ class DayViewState extends State> { minuteSlotSize: minuteSlotSize, onDateTap: widget.onDateTap, onDateLongPress: widget.onDateLongPress, + startHour: _startHour, ); /// Default timeline builder this builder will be used if diff --git a/lib/src/week_view/week_view.dart b/lib/src/week_view/week_view.dart index e922a78e..b9aa7e94 100644 --- a/lib/src/week_view/week_view.dart +++ b/lib/src/week_view/week_view.dart @@ -686,6 +686,7 @@ class WeekViewState extends State> { minuteSlotSize: minuteSlotSize, onDateTap: widget.onDateTap, onDateLongPress: widget.onDateLongPress, + startHour: _startHour, ); /// Default builder for week line.