Skip to content

Commit

Permalink
add todo for handling blank cells
Browse files Browse the repository at this point in the history
  • Loading branch information
TomJGooding committed May 24, 2024
1 parent 5d90bfd commit 1a826f4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/textual/widgets/_month_calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 1a826f4

Please sign in to comment.