aiogram_calendar icon indicating copy to clipboard operation
aiogram_calendar copied to clipboard

callback handler never handle calendar

Open ghost opened this issue 2 years ago • 3 comments

Hello! I'm try to use calendar in my project. So, I can show calendar in bot. But when pressing on calendar keys in Telegram then function never handle it. simple_cal_callback.filter() has no effects too. My code:

@disp.callback_query_handler(dialog_cal_callback.filter())
async def process_get_check_in_date_state(query: CallbackQuery, data: dict) -> None:
    selected, date = await SimpleCalendar().process_selection(query, data)
    if selected:
        await query.message.answer(
            f'You selected {date.strftime("%d/%m/%Y")}'
        )

ghost avatar Mar 24 '23 06:03 ghost

Upd: If I stop script and run again then function start handling. WTF?

ghost avatar Mar 24 '23 09:03 ghost

it seems this is something related to callback handler and filters, did you tried in aiogram 3?

noXplode avatar Nov 28 '23 21:11 noXplode

it seems this is something related to callback handler and filters, did you tried in aiogram 3?

never happen in aiogram3

o-murphy avatar Nov 29 '23 22:11 o-murphy