From 1a826f4780338372f83da9d541eae03ceafdaead Mon Sep 17 00:00:00 2001 From: TomJGooding <101601846+TomJGooding@users.noreply.github.com> Date: Fri, 24 May 2024 22:17:44 +0100 Subject: [PATCH] add todo for handling blank cells --- src/textual/widgets/_month_calendar.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/textual/widgets/_month_calendar.py b/src/textual/widgets/_month_calendar.py index 8e224ea3a8..c77f27f700 100644 --- a/src/textual/widgets/_month_calendar.py +++ b/src/textual/widgets/_month_calendar.py @@ -118,6 +118,9 @@ def _on_table_cell_highlighted( ) -> None: event.stop() if not self.show_other_months and event.value is None: + # TODO: This handling of blank cells is obviously a bit hacky. + # Instead this widget should prevent highlighting a blank cell + # altogether, either with the keyboard or mouse. table = self.query_one(MonthCalendarTable) date_coordinate = self._get_date_coordinate(self.date) with self.prevent(MonthCalendarTable.CellHighlighted):