Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions aiogram_calendar/simple_calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ class SimpleCalendar(GenericCalendar):
async def start_calendar(
self,
year: int = datetime.now().year,
month: int = datetime.now().month
month: int = datetime.now().month,
custom_activity_button: InlineKeyboardButton | None = None
) -> InlineKeyboardMarkup:
"""
Creates an inline keyboard with the provided year and month
Expand Down Expand Up @@ -118,7 +119,10 @@ def highlight_day():
text=self._labels.cancel_caption,
callback_data=SimpleCalendarCallback(act=SimpleCalAct.cancel, year=year, month=month, day=day).pack()
))
cancel_row.append(InlineKeyboardButton(text=" ", callback_data=self.ignore_callback))
if custom_activity_button:
cancel_row.append(custom_activity_button)
else:
cancel_row.append(InlineKeyboardButton(text=" ", callback_data=self.ignore_callback))
cancel_row.append(InlineKeyboardButton(
text=self._labels.today_caption,
callback_data=SimpleCalendarCallback(act=SimpleCalAct.today, year=year, month=month, day=day).pack()
Expand Down