Qu in using
Hello! About 2 days ago I've tried to use dialog calendar. Like that:
@dp.message_handler(state=Wallet.Graph_state)
async def painting_Graph(message: Message):
currency = message.text
await message.answer("Please select a date: ", reply_markup=await DialogCalendar().start_calendar())
@dp.callback_query_handler(dialog_cal_callback.filter())
async def process_dialog_calendar(callback_query: CallbackQuery, callback_data: dict):
selected, date = await DialogCalendar().process_selection(callback_query, callback_data)
if selected:
await callback_query.message.answer(
f'You selected {date.strftime("%d/%m/%Y")}', reply_markup=markup)
Can I use it in state machine or it incompatible with it?
@djskeletik, this help you https://ru.stackoverflow.com/questions/1398006/Проблема-с-aiogram-calendar-и-fsm
@djskeletik in your example you are using state only in message_handler which suppose to show inline keyboard. So at this point its not related to calendar yet. Can you explain what is not working? Calendar provides keyboards & a series of callbacks. Overall it depends on your FSM use
@noXplode The problem is that when I started the calendar with the State, the callback_query_handler did not accept input on the calendar, but if I reset the state before starting the calendar (without deleting the information in the state), it worked. So now it works.) Thanks for help @lev007-ops
thanks, I already figured it out, yesterday I wanted to delete it, but somehow my hands did not reach)
Пн, 29 авг. 2022 г. в 15:21, Levman5 @.***>:
@djskeletik https://github.com/djskeletik, this help you https://ru.stackoverflow.com/questions/1398006/Проблема-с-aiogram-calendar-и-fsm
— Reply to this email directly, view it on GitHub https://github.com/noXplode/aiogram_calendar/issues/4#issuecomment-1230212135, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATAOIC7ZBYNOHO2D5NCLPW3V3STOJANCNFSM57OXQ5PQ . You are receiving this because you were mentioned.Message ID: @.***>