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

callback handler never handle calendar #9

Open
ghost opened this issue Mar 24, 2023 · 3 comments
Open

callback handler never handle calendar #9

ghost opened this issue Mar 24, 2023 · 3 comments

Comments

@ghost
Copy link

ghost commented Mar 24, 2023

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
Copy link
Author

ghost commented Mar 24, 2023

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

@noXplode
Copy link
Owner

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

@o-murphy
Copy link
Contributor

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

never happen in aiogram3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants