onTap method

dynamic onTap()

Implementation

onTap() {
  if (position == null) return;
  int row = position!.dy ~/
      ((xbCalendarDayH ?? xbCalendarDayW) + xbCalendarDayRowGap);
  int col = position!.dx ~/ xbCalendarDayW;
  int index = row * 7 + col - widget.month.firstDayWeekDayIndex;
  final day = widget.month.days[index];
  if (day.isEnable == false) return;
  widget.onSelectDate(day.dateTime);
}