npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ai-calendar

v1.0.12

Published

Customizable calendar component for Vue and Quasar Framework

Readme

image_calendar

AiCalendar (Vue or Quasar)

Customizable and stylized calendar with events. It is compatible with Vue and is suitable as an alternative to q-date from Quasar. Настраиваемый и стилизованный календарь с событиями. Он совместим с Vue и подходит в качестве альтернативы q-data от Quasar.

Versions / Версии

vue: ^3.0 quasar: ^2.0

Installation / Установка

npm install ai-calendar
       or
npm i ai-calendar

Description of properties / Описание свойств

| props | type | en | ru |
|-------|-----|-----|-------|
| isQuasar | boolean | Do you use Quasar? If the value is true, then the q-icon will be used for the button and you can use any icons from quasar.conf (eva, mdi,...). And if the value is false, then there will be a standard switch symbol "‹›", but it is also possible to connect mdi icons by specifying: "mdi mdi-chevron-left" | Используете ли вы Quasar? Если значение true, то будет использован q-icon для button и вы можете использовать любые иконки из quasar.conf (eva, mdi,...). А если значение false, то будет стандартный символ переключателей "‹›", но возможно и подключение mdi иконок, указав: "mdi mdi-chevron-left" | | eventsColors | array | An array with event colors. There are already 7 colors included as standard, but you can specify your own. If the events property already has a color, then the array is ignored | Массив с цветами событий. Стандартно включены уже есть 7 цветов, но вы можете указать свой. Если в свойстве events уже есть color, то массив игнорируется | | locale | object | Used for localization, it works in English as standard, which you can change. The weekDays property contains an array of days of the week (7 days), the MonthNames property contains an array of month names | Используется для локализации, стандартно работает на английском языке, который вы можете поменять. Свойство weekDays содержит массив дней недели (7 дней), свойство monthNames содержит массив названий месяцев | | fontSizeDays | integer | Font size for displaying days in the calendar | Размер шрифта для отображения дней в календаре | | fontSizeIcon | integer/float | The size of the button icons is the size in em. Maximum size 2em | Размер иконок кнопок размеры в em. Максимальный размер 2em | | iconLeft | string | The icon of the "left" button. If isQuasar = true, it is compatible with all icons from the Quasar framework | Иконка кнопки "влево". Если isQuasar = true, то совместим со всеми иконками из фреймворка Quasar | | iconRight | string | The icon of the "right" button. If isQuasar = true, it is compatible with all icons from the Quasar framework | Иконка кнопки "вправо". Если isQuasar = true, то совместим со всеми иконками из фреймворка Quasar | | yearMin | integer | Minimum year to generate the list | Минимальный год, для генерации списка | | yearMax | integer | The maximum year to generate a list | Максимальный год, для генерации списка | | swipable | boolean | Can I scroll through? If the value is true, then you can swipe on computers and smartphones. By default, the property has the value true | Можно пролистывать? Если значение true, то можно свайпить на компьютерах и смартфонах. По дефолту свойство имеет значение true | | heightCalendar | boolean | Property for changing the height of the calendar. By default, the property has the value false | Свойство для изменения высоты календаря. По дефолту свойство имеет значение false | | showFilter | boolean | Activating the filtering function by event type | Активация функции фильтрации по типу событии |
| iconFilter | string | The icon of the "filter" button. If isQuasar = true, it is compatible with all icons from the Quasar framework | Иконка кнопки "фильтр". Если isQuasar = true, то совместим со всеми иконками из фреймворка Quasar |
| colorButtonIcon | string | Sets the color of the button. If isQuasar = true, it takes the system color dark or light | Задаёт цвет кнопки. Если isQuasar = true, то принимает цвет системы dark или light |
| types | array | An array of event types. Each array property contains a type, a name, and a color. | Массив типов событий. Каждое свойство массива содержит тип, имя и цвет |

Connection example / Пример подключения

Minimal with default properties / Минимальный тип с дефолтными свойствами:

<ai-calendar/>

Old syntax without "setup" / Старый синтаксис без "setup"

<template>
  <div style="width: 100%; max-width: 450px; margin: 0 auto;">
    <ai-calendar
        :events="[
            {
              date: '2025-06-15',
              events: [{ type: 'alert', name: 'Alert name', description: '...' }]
            }
           ]"
        @date-selected="handleDateSelection"
    />
  </div>
</template>

<script>
import AiCalendar from 'ai-calendar';
import 'ai-calendar/dist/ai-calendar.css'; //Add CSS style
export default {
  components: {
    AiCalendar
  },
  methods: {
    handleDateSelection({ date, events }) {
      console.log('Date: '+new Date(date).toLocaleDateString('en-CA', { year: 'numeric', month: '2-digit', day: '2-digit' }))
      console.log(events)
    }
  }
};
</script>

New syntax for setup (Composition API). An example with many properties. Новый синтаксис setup (Composition API). Пример с множеством свойств.

<template>
  <div style="width: 100%; max-width: 450px; margin: 0 auto;">
    <ai-calendar
        @date-selected="handleDateSelection"
        :events="events"
        :is-quasar="true"
        icon-left="eva-arrow-ios-back-outline"
        icon-right="eva-arrow-ios-forward-outline"
        :font-size-days="1.1"
        :font-size-icon="1.2"
        :year-min="3"
        :year-max="5"
        :locale="locale"
        :swipable="true"
        :height-calendar="false"
        :show-filter="true"
        color-button-icon="#333"
        :types="types"
    />
  </div>
</template>
<script setup>
import { defineProps, defineEmits } from 'vue';
import AiCalendar from 'ai-calendar';
import 'ai-calendar/dist/ai-calendar.css'
// Определяем props
const props = defineProps({
  events: {
    type: Array,
    default: () => []
  },
  eventsColors: {
    type: Array,
    default: () => ['#FF9800', '#4CAF50', '#F44336']
  },
  locale: {
    type: Object,
    default: () => ({
      weekDays: ['Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб', 'Вс'],
      monthNames: [
        'Январь', 'Февраль', 'Март', 'Апрель',
        'Май', 'Июнь', 'Июль', 'Август',
        'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'
      ]
    })
  },
  iconLeft: {
    type: String,
    default: null
  },
  iconRight: {
    type: String,
    default: null
  }
});

// Определяем emit
const emit = defineEmits(['date-selected']);
const emitEvents = defineEmits(['events']);
// Обработчик выбора даты
const handleDateSelection = ({ date, events }) => {
  emit('date-selected', date);
  emitEvents('events', events);
};

// Пример данных
const events = [
  {
    date: '2025-06-15',
    events: [
      { type: 'alert', name: 'Alert name', description: '...' }
    ]
  },
  {
    date: '2025-06-16',
    events: [
      { type: 'alert', name: 'Alert name', description: '...' },
      { type: 'warning', name: 'Warning name', description: '...' },
      { type: 'info', name: 'Info name', description: '...'},
    ]
  }
];
const types = [
  { type: 'alert', name: 'Alert', color: '#e54e4e' },
  { type: 'warning', name: 'Warning', color: '#e5b34e' },
  { type: 'info', name: 'Info', color: '#4e6fe5' },
  { type: 'success', name: 'Success', color: '#4ee58b' }
];
const locale = {
  weekDays: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
  monthNames: [
    'January', 'February', 'March', 'April',
    'May', 'June', 'July', 'August',
    'September', 'October', 'November', 'December'
  ]
};

const iconLeft = 'arrow_left';
const iconRight = 'arrow_right';
</script>