
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Особенный календарь 📅 на 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 0 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.