Skip to content

Latest commit

 

History

History
101 lines (75 loc) · 3.17 KB

CHANGELOG.md

File metadata and controls

101 lines (75 loc) · 3.17 KB

Change Log

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

2.2.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)

2.1.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

2.0.6 - 2023-07-19

Added:

  • Indonesian language support.
  • Turkish language support.