Releases: VDS13/telegram-inline-calendar
Releases · VDS13/telegram-inline-calendar
2.3.0
1.9.0
2.2.0: Merge pull request #15 from semklim/patch-1
Added:
- Ukrainian language support.
- Function
changeLang
, which changes the language of the bot messages. A little later we will add the ability to bind the language to the user.
(Thanks @semklim)
1.8.0: Merge pull request #15 from semklim/patch-1
Added:
- Ukrainian language support.
- Function
changeLang
, which changes the language of the bot messages. A little later we will add the ability to bind the language to the user.
(Thanks @semklim)
2.1.0
Added:
- Option
lock_date
to block the selection of certain dates. Defaults tofalse
.
Locked dates are specified as an array of strings in the format"YYYY-MM-DD"
in the class variablelock_date_array
(By default the array is empty).
Example:
const calendar = new Calendar(bot, {
date_format: 'MMM D, YYYY h:mm A',
language: 'de',
start_week_day: 1,
lock_date: true
});
calendar.lock_date_array = ["2023-11-17", "2023-11-19"];
- Option
lock_datetime
to block the selection of time on a specific date.. Defaults tofalse
.
Locked dates are specified as an array of strings in the format"YYYY-MM-DD HH:mm"
in the class variablelock_datetime_array
(By default the array is empty).
Example:
const calendar = new Calendar(bot, {
date_format: 'MMM D, YYYY h:mm A',
language: 'en',
start_week_day: 1,
lock_datetime: true
});
calendar.lock_datetime_array = ["2023-11-17 08:30", "2023-11-17 11:45"];
Changed:
- Options
start_date
andstop_date
can also be entered in the format"YYYY-MM-DD HH:mm"
. The specified time is taken into account in the time selection menu.
- Options
start_date
andstop_date
now work conditionally:
start_date < stop_date
instead of:
start_date <= new Date() <= stop_date
- In options
start_date
andstop_date
you can specify the value"now"
, which, when launched, will set the current date and time in the format"YYYY-MM-DD HH:mm"
(does not change dynamically, the feature will be added in future updates).
Example:
const calendar = new Calendar(bot, {
date_format: 'MMM D, YYYY h:mm A',
language: 'de',
start_week_day: 1,
time_selector_mod: true,
time_range: "08:00-15:59",
time_step: "15m",
start_date: 'now',
stop_date: '2024-04-20 14:00'
});
1.7.0
Added:
- Option
lock_date
to block the selection of certain dates. Defaults tofalse
.
Locked dates are specified as an array of strings in the format"YYYY-MM-DD"
in the class variablelock_date_array
(By default the array is empty).
Example:
const calendar = new Calendar(bot, {
date_format: 'MMM D, YYYY h:mm A',
language: 'de',
start_week_day: 1,
lock_date: true
});
calendar.lock_date_array = ["2023-11-17", "2023-11-19"];
- Option
lock_datetime
to block the selection of time on a specific date.. Defaults tofalse
.
Locked dates are specified as an array of strings in the format"YYYY-MM-DD HH:mm"
in the class variablelock_datetime_array
(By default the array is empty).
Example:
const calendar = new Calendar(bot, {
date_format: 'MMM D, YYYY h:mm A',
language: 'en',
start_week_day: 1,
lock_datetime: true
});
calendar.lock_datetime_array = ["2023-11-17 08:30", "2023-11-17 11:45"];
Changed:
- Options
start_date
andstop_date
can also be entered in the format"YYYY-MM-DD HH:mm"
. The specified time is taken into account in the time selection menu.
- Options
start_date
andstop_date
now work conditionally:
start_date < stop_date
instead of:
start_date <= new Date() <= stop_date
- In options
start_date
andstop_date
you can specify the value"now"
, which, when launched, will set the current date and time in the format"YYYY-MM-DD HH:mm"
(does not change dynamically, the feature will be added in future updates).
Example:
const calendar = new Calendar(bot, {
date_format: 'MMM D, YYYY h:mm A',
language: 'de',
start_week_day: 1,
time_selector_mod: true,
time_range: "08:00-15:59",
time_step: "15m",
start_date: 'now',
stop_date: '2024-04-20 14:00'
});