@khorshid-js/holidays
v0.1.0
Published
Official Khorshid plugin — marks public holidays on the calendar from pluggable providers (Nager.Date global, Iran, or your own API).
Maintainers
Readme
@khorshid-js/holidays
The official holidays plugin for Khorshid. It marks public holidays on the calendar. Holiday data comes from a provider: Iran (online or offline), Nager.Date for other countries, or your own API.
npm install @khorshid-js/holidays @khorshid-js/coreimport { createDatePicker } from '@khorshid-js/dom';
import { holidaysPlugin, nagerProvider } from '@khorshid-js/holidays';
// Iran, bundled data, no network
createDatePicker('#d', { plugins: [holidaysPlugin({ offline: true })] });
// Any country Nager.Date covers (it does not include Iran)
createDatePicker('#d', { plugins: [holidaysPlugin({ provider: nagerProvider({ country: 'DE' }) })] });Online data is fetched once per visible year and cached. Requests are cancelled when the picker is destroyed.
Most apps should install khorshid, which bundles every layer behind one import. Use the scoped packages when you want only some of them.
MIT
