Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

horizontal TableCalendar for Web spacing issue #888

Open
hemantchauhan opened this issue Jul 25, 2024 · 0 comments
Open

horizontal TableCalendar for Web spacing issue #888

hemantchauhan opened this issue Jul 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@hemantchauhan
Copy link

I am not sure if you would call it a bug.
But TableCalendar on web, shows up with too much space between day cells. please see screenshot.
how can I decrease the spacing between days. even if set the calendarFormat to CalendarFormat.month it scales vertically with the spacing between day cells the same as in screenshot.

TableCalendar(
      startingDayOfWeek: viewModel.startingDOW,
      firstDay: viewModel.calendarStartDate(),
      focusedDay: viewModel.currentDate,
      lastDay: viewModel.calendarEndDate(),
      calendarFormat: CalendarFormat.month,
      headerVisible: false,
      rowHeight: 60,
      daysOfWeekStyle: DaysOfWeekStyle(
        weekdayStyle: Styles.genericTextStyle(fontSize: 12)
            .copyWith(color: AppColors.defaultNeutralGray),
        weekendStyle: Styles.genericTextStyle(fontSize: 12)
            .copyWith(color: AppColors.defaultNeutralGray),
        dowTextFormatter: (date, locale) {
          var day = DateFormat.E(locale).format(date);
          return day.substring(0, day.length - 1);
        },
      ),
      calendarStyle: const CalendarStyle(
        outsideDaysVisible: false,
        //markersAnchor: -0.1,
        //markerSize: 2.0,
        markerSizeScale: 0.2,
        markersAnchor: 0.1,
        markerMargin: EdgeInsets.symmetric(horizontal: 0.3),
        markersAlignment: Alignment.bottomCenter,
        markersMaxCount: 4,
        //markerMargin: EdgeInsets.all(0),
        canMarkersOverflow: false,
      ),
      shouldFillViewport: true,
      onPageChanged: viewModel.onPageChanged,
      eventLoader: viewModel.eventsForDay,
)
Screenshot 2024-07-25 at 11 43 46 Screenshot 2024-07-25 at 11 54 05
@hemantchauhan hemantchauhan added the bug Something isn't working label Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant