Persian Date Picker
A robust, accessible date picker built on Reka UI. Features native Jalali/Gregorian switching, weekend highlighting, and ISO-8601 string support.
Installation
npx raya-ui@latest add persian-date-pickerFeatures
- Native Jalali Support: Uses
fa-IR-u-ca-persianlocale for accurate Persian calendar calculations without heavy moment/date-fns libraries. - Dual Mode: Users can toggle between Jalali and Gregorian calendars directly inside the popup.
- Weekend Logic: Automatically highlights Fridays in Jalali mode and Sat/Sun in Gregorian mode.
- RTL/LTR: Automatically adjusts layout direction based on the active calendar.
- Keyboard Navigation: Full keyboard support powered by Reka UI primitives.
File Structure
your-project
components
ui
persian-date-picker
PersianDatePicker.vue
API Reference
Props
modelValuestring | { start: string, end: string }The bound date value in standard ISO 8601 format (e.g., "2026-05-06"). Becomes an object with start/end strings if range is true.
rangebooleanfalseEnables date range selection mode instead of single date picking.
placeholderstring"انتخاب تاریخ"Text displayed inside the trigger button when no date is actively selected.
disabledbooleanfalseDisables interaction with the picker trigger.
Active Model Value
2026-05-06Settings
source-code.vue
<script setup lang="ts">
import { ref } from 'vue'
import { PersianDatePicker } from '@/components/ui/persian-date-picker'
// Accepts standard ISO 8601 strings
const date = ref('2026-05-06')
</script>
<template>
<PersianDatePicker
v-model="date"
class="w-full max-w-sm"
/>
</template>