SimformSolutionsPvtLtd / flutter_calendar_view

A Flutter package allows you to easily implement all calendar UI and calendar event functionality. 👌🔝🎉
https://pub.dev/packages/calendar_view
MIT License
418 stars 253 forks source link

Wrong date onDateTap when startHour != 0 #341

Closed rmpt closed 5 months ago

rmpt commented 6 months ago

When startHour is set, onDateTap receives a wrong time. The received time on the callback matches the index of the row on the view and not the actual hour, i.e., if you set a startHour of 9, the rendering is correct and the first hour on the calendar is 9. But if you tap the top of the day on DayView or WeekView - 9:00, the received time onDateTap is 0.

To fix this, before calling the callback the date must sum the defined startHour.