Comments (6)
I understood you.
Today I will try to test and release an update)
from telegram-inline-calendar.
Hello, @MrBouchtaoui!
First of all, thank you, I’m glad that my library was useful to someone)
Did I understand you correctly, you want it to be possible if you select the wrong month, say, to be able to go back to choosing the month?
from telegram-inline-calendar.
The problem is that I can press < or > one time and than it stops working.
Example:
Calendar starts with January 2024
I press next > I get February
I press next > it stays at February instead of March
I press previous < it stays at February
So the next > or previous < buttons work once and than stop working.
I use the code in my previous post.
I also declared the calendar like this:
let calendar = new Calendar(bot, {
date_format: 'DD-MM-YYYY',
language: 'en',
bot_api: 'telegraf'
});
I hope you have an idea what might be the problem and how to fix it.
from telegram-inline-calendar.
I found the solution after studying your code.
if (
ctx.callbackQuery.message.message_id ==
calendar.chats.get(ctx.callbackQuery.message.chat.id)
) {
res = calendar.clickButtonCalendar(ctx.callbackQuery);
if (res !== -1) {
await ctx.reply("You selected: " + res);
} else { // rewind this step to handle next button action!
ctx.wizard.cursor--;
}
}
Maybe you can update your examples with a wizard demo. Anyway, thank you very much for sharing this nice library 👌🏼
from telegram-inline-calendar.
Hello, @MrBouchtaoui!
I apologize for the long response, I’m currently busy with my main work, I’ll test it and release an update in the near future.
from telegram-inline-calendar.
Good afternoon, @MrBouchtaoui!
Sorry for the long response, it was too much work.
Regarding your issue: I tested and carefully studied your comment. The problem occurs due to the use of wizard scene
, which is a special case of using the library. A little later I will add a FAQ where I will describe such cases. Thanks for your support and use of the library.
from telegram-inline-calendar.
Related Issues (11)
- 'Bad Request' Error HOT 4
- Could not find a declaration file for module HOT 18
- Is it possible to not display a specific date and time? HOT 9
- Could not find a declaration file for module '../utilites/calendar/Calendar.js'. HOT 6
- Changing days order HOT 1
- Change message HOT 13
- Error when trying to move through months HOT 13
- TypeError: NavCalendar is not a constructor HOT 3
- Could not find a declaration file for module 'telegram-inline-calendar'. HOT 16
- Get the wrong time when calling clickButtonCalendar HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from telegram-inline-calendar.