Skip to content

Latest commit

 

History

History
233 lines (157 loc) · 6.96 KB

CHANGELOG.md

File metadata and controls

233 lines (157 loc) · 6.96 KB

Change Log

All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.

1.9.0 - 2025-02-05

Added:

  • Option user_lang_select which gives the user the ability to select the language of the calendar.

1.8.0 - 2024-07-30

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.7.0 - 2023-11-28

Added:

  • Option lock_date to block the selection of certain dates. Defaults to false. Locked dates are specified as an array of strings in the format "YYYY-MM-DD" in the class variable lock_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 to false. Locked dates are specified as an array of strings in the format "YYYY-MM-DD HH:mm" in the class variable lock_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 and stop_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 and stop_date now work conditionally:
start_date < stop_date

instead of:

start_date <= new Date() <= stop_date
  • In options start_date and stop_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'
});

More details in the API and examples

1.6.4 - 2023-07-19

Added:

  • Indonesian language support.
  • Turkish language support.

1.6.2 - 2023-03-16

Added:

  • ESM Support Information.

1.6.1 - 2023-03-05

Changed:

  • Fix examples.

1.6.0 - 2023-03-03

Added:

  • Option custom_start_msg to change the text of the message sent with the calendar/time selector.

Example:

const calendar = new Calendar(bot, {
    date_format: 'DD-MM-YYYY',
    language: 'en',
    bot_api: 'grammy',
    custom_start_msg: 'Сustom start message'
});

1.5.0 - 2023-02-22

Added:

  • Options start_date and stop_date to limit the pool of dates in the calendar.

Example:

const calendar = new Calendar(bot, {
    date_format: 'DD-MM-YYYY',
    language: 'en',
    bot_api: 'grammy',
    start_date: '2022-11-15',
    stop_date: '2023-04-20'
});

Note:

start_date <= new Date() <= stop_date

1.4.0 - 2023-01-25

Added:

Changed:

  • Library optimization.
  • Fixed bugs in EXAMPLES.md and README.md

1.3.3 - 2023-01-22

Changed:

  • Library optimization.

1.3.2 - 2023-01-14

Changed:

  • Hotfix README.md.

1.3.1 - 2023-01-14

Changed:

  • Hotfix README.md.

1.3.0 - 2023-01-14

Added:

  • Time selector (can be used in conjunction with the calendar and separately). More details in the API and examples

1.2.1 - 2023-01-14

Changed:

  • Hotfix close_calendar.

1.2.0 - 2023-01-12

Added: (issues#2)

  • Option start_week_day, which sets the first day of the week (Sunday - 0, Monday - 1, Tuesday - 2 and so on).

1.1.2 - 2023-01-02

Changed: (issues#1)

  • Fixed bug with callback_data overflow.

1.1.1 - 2022-12-22

Changed:

  • Hotfix close_calendar.

1.1.0 - 2022-12-22

Added:

  • Option close_calendar, which determines whether to close the calendar after selecting a date.