![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Особенный календарь 📅 на JavaScript
Возможности:
ru
, tr
и uk
;Поддержка в браузерах:
npm install calendula
<link rel="stylesheet" href="node_modules/calendula/dist/calendula.all.css" />
<script src="node_modules/calendula/dist/calendula.all.js"></script>
Для подключения только нужной локали и темы:
<link rel="stylesheet" href="node_modules/calendula/dist/calendula.css" />
<link rel="stylesheet" href="node_modules/calendula/dist/themes/default.css" />
<script src="node_modules/calendula/dist/calendula.js"></script>
<script src="node_modules/calendula/dist/locales/en.js"></script>
Или воспользуйтесь инструментом для сборки.
var c = new Calendula({
theme: 'ios',
locale: 'en',
value: '2018-10-11'
//...
});
№ | Свойство | Тип | По умолчанию | Описание |
---|---|---|---|---|
1. | autocloseable | Boolean | true | Закрытие календаря при клике мимо него. |
2. | closeAfterSelection | Boolean | true | Закрытие календаря при выборе даты. |
3. | locale | String | en | Язык интерфейса.be de en es fr it pl ru tr uk |
4. | max | String Date Number | Максимальная дата. | |
5. | min | String Date Number | Минимальная дата. | |
6. | position | String | auto auto | Позиция календаря относительно switcher .Формат: x y .x : auto , left , center или right .y : auto , top , center или bottom . |
7. | switcher | DOMElement | Кнопка, при клике на которую открывается и позиционируется календарь. | |
8. | theme | String | default | Тема оформления.default black ios metro android |
9. | value | String Date Number | текущая дата | Выбранная дата. |
10. | years | String | -11:1 | Установка диапазона для списка лет. |
Поддерживаемые форматы дат:
2018-11-22
2018/11/22
2018.11.22
22-11-2018
22/11/2018
22.11.2018
new Date(2018, 11, 12)
1418328000000
{day: 22, month: 10 /* 0-11 */, year: 2018}
Открыть календарь.
Закрыть календарь.
Открыть/закрыть календарь.
Проверка открытия календаря.
Получить или установить значение настройки.
Установить событие.
c.on('select', function(e, data) {
console.log(data.day, data.month, data.year);
});
Снять событие.
Установить цветную подсказку на дату.
c.title.set({date: '2018-12-15', text: 'Hello world!', color: 'red'});
c.title.set([
{date: '2018-12-11', text: 'Hello world!', color: 'red'},
{date: '2018-12-12', text: 'Hello world!', color: 'orange'},
{date: '2018-12-13', text: 'Hello world!', color: 'blue'}
]);
Удалить цветную подсказку.
c.title.remove('2018-12-15');
c.title.remove(['2018-12-11', '2018-12-12', '2018-12-13']);
Удалить все цветные подсказки.
Уничтожить календарь: привязку событий, DOM-элементы и пр.
Календарь открыт.
Календарь закрыт.
Выбрана дата.
Тесты:
npm test
Пересборка:
npm run build
MIT License
FAQs
A special datepicker
The npm package calendula receives a total of 3 weekly downloads. As such, calendula popularity was classified as not popular.
We found that calendula demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.