Skip to content

Getting started

Taqwim is a set of packages, not one. Pick the pair that matches your framework: a headless package for behaviour and accessibility, and a styled package if you want it to look like a calendar out of the box.

This is the real component from the real package — the same one the code below installs. The buttons above the page switch every example on it, this one included.

Rabi' al-awwal 1448
Calendar for Rabi' al-awwal 1448
Selectednothing yet

Tab into the grid, then use the arrow keys, Home/End, PageUp/PageDown (with Shift for years) and Enter to select. Under dir="rtl" the horizontal keys mirror.

Rabi' al-awwal 1448
Calendar for Rabi' al-awwal 1448
Selectednothing yet

Tab into the grid, then use the arrow keys, Home/End, PageUp/PageDown (with Shift for years) and Enter to select. Under dir="rtl" the horizontal keys mirror.

Rabi' al-awwal 1448
Calendar for Rabi' al-awwal 1448
Selected nothing yet

Tab into the grid, then use the arrow keys, Home/End, PageUp/PageDown (with Shift for years) and Enter to select. Under dir="rtl" the horizontal keys mirror.

Rabi' al-awwal 1448
Calendar for Rabi' al-awwal 1448
Selectednothing yet

Tab into the grid, then use the arrow keys, Home/End, PageUp/PageDown (with Shift for years) and Enter to select. Under dir="rtl" the horizontal keys mirror.

No live Angular island here. @analogjs/vite-plugin-angular does not compile an Angular app under Vite 8, which is the same gap that keeps Angular out of the default end-to-end run.

The adapter itself is built and type-checked by ngc with strictTemplates on every change, and playground/angular runs with pnpm --filter taqwim-playground-angular dev.

Terminal window
pnpm add @taqwim/vue-styled@alpha

Each styled package pulls in its headless sibling and @taqwim/themes, so that is the only dependency you need to add.

<script setup lang="ts">
import { HijriCalendar } from '@taqwim/vue-styled'
import { ref } from 'vue'
const date = ref()
</script>
<template>
<HijriCalendar v-model="date" theme="islamic" locale="ar" dir="rtl" />
</template>

HijriDatePicker is the same calendar behind a text input. It is single-select by design: the input holds one formatted date.

Selectednothing yet

With editable on, the input accepts 1446-09-01 or 01/09/1446. Text it cannot parse reverts to the last good value rather than clearing the selection. The trigger is a combobox: Enter opens the popup, Escape closes it and returns focus.

Selectednothing yet

With editable on, the input accepts 1446-09-01 or 01/09/1446. Text it cannot parse reverts to the last good value rather than clearing the selection. The trigger is a combobox: Enter opens the popup, Escape closes it and returns focus.

Selected nothing yet

With editable on, the input accepts 1446-09-01 or 01/09/1446. Text it cannot parse reverts to the last good value rather than clearing the selection. The trigger is a combobox: Enter opens the popup, Escape closes it and returns focus.

Selectednothing yet

With editable on, the input accepts 1446-09-01 or 01/09/1446. Text it cannot parse reverts to the last good value rather than clearing the selection. The trigger is a combobox: Enter opens the popup, Escape closes it and returns focus.

No live Angular island here — @analogjs/vite-plugin-angular does not compile an Angular app under Vite 8. Run playground/angular locally to try<taqwim-hijri-datepicker>.

If you only need conversion and arithmetic — on a server, say — @taqwim/core has no framework dependency and no DOM.

Terminal window
pnpm add @taqwim/core@alpha
import { toHijri, toGregorian, addHijriMonths, formatHijriDate } from '@taqwim/core'
const today = toHijri(new Date()) // { hy: 1447, hm: 2, hd: 14 }
const later = addHijriMonths(today, 3)
formatHijriDate(later, 'iD iMMMM iYYYY', 'ar')
toGregorian(later) // a Date at local midnight

Conversion covers 1343–1500 AH (1924–2077 CE), the range the Umm al-Qura table defines. Outside it, Taqwim throws HijriRangeError rather than returning a quietly wrong date.

Dates without a calendar covers the rest of that package: arithmetic, business days, comparison, parsing and locale-aware formatting.

The styled packages are composed entirely from public headless parts. When you need different markup, drop to those — see your framework’s page under Frameworks for the full compound surface.