npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

vue-persian-calendar-datepicker

v1.2.8

Published

A Vue 3 Persian calendar and datepicker with official Iranian holidays, Jalali, Hijri, and Gregorian date support.

Readme

This is a Vue 3 component library providing full-featured calendar and date picker components with automatic conversions between three calendar systems. Display and select dates across Persian (Jalali), Hijri (Islamic), and Gregorian calendars simultaneously with comprehensive event management, smart theming, and extensive customization options.

Visualize date selection directly on the calendar using mouse interaction or programmatic control. The component includes over 300 Persian holidays and observances, Islamic religious events, and international world days with smart event indicators and detailed tooltips.

Features

  • Triple Calendar System - Display Persian (Jalali), Hijri (Islamic), and Gregorian dates with automatic conversions
  • Comprehensive Events - 300+ Persian holidays, Islamic events, and international observances with visual indicators
  • Two Component Options - Full calendar view or compact datepicker with popup
  • Advanced Theming - Light, dark, or auto-detection with per-color customization
  • Date Range Control - Restrict selectable dates with from and to props
  • Accurate Conversions - Precise Hijri conversion using lookup tables (1427-1464 AH)
  • TypeScript Support - Complete type definitions for full IDE support
  • Extensive Customization - 30+ slot-based customization points
  • Responsive Design - Mobile-friendly with automatic popup positioning
  • High Performance - Optimized rendering with computed properties

Demo

Vue Persian Calendar Demo

Try the component interactively. The demo showcases calendar selection, datepicker interaction, custom theming, and comprehensive event management.

Quick Start

Installation

npm install vue-persian-calendar-datepicker

Basic Usage

<script setup>
import { PersianCalendar, PersianDatePicker } from 'vue-persian-calendar-datepicker'
</script>

<template>
  <!-- Full calendar -->
  <PersianCalendar />
  
  <!-- Compact date picker -->
  <PersianDatePicker v-model="date" />
</template>

Calendar Example

<script setup>
import { PersianCalendar } from 'vue-persian-calendar-datepicker'

const handleSelectDate = (event) => {
  console.log(event.date)        // [1403, 6, 15]
  console.log(event.events)      // { persianEvents: [...], hijriEvents: [...], ... }
}
</script>

<template>
  <PersianCalendar
    theme="dark"
    @select-date="handleSelectDate"
  />
</template>

Date Picker Example

<script setup>
import { ref } from 'vue'
import { PersianDatePicker } from 'vue-persian-calendar-datepicker'

const selectedDate = ref(null)

const handleDateChange = (date) => {
  console.log('Date changed:', date)
}
</script>

<template>
  <PersianDatePicker
    v-model="selectedDate"
    format="text"
    @change="handleDateChange"
  />
</template>

Browser Support

  • Chrome/Edge (latest)
  • Firefox (latest)
  • Safari (latest)
  • Mobile browsers (iOS Safari, Chrome Mobile)

Accurate Date Conversions

The component uses precise conversion algorithms:

  • Jalali to Gregorian: Accurate for all historical and future dates
  • Jalali to Hijri: Uses lookup tables for years 1427-1464 AH with fallback calculations
  • Gregorian to Jalali: Reverse conversion with high precision

Event Categories

The calendar displays:

  • Persian Events: 100+ official and commemorative days (رویدادهای ایرانی)
  • Hijri Events: 50+ Islamic religious events (رویدادهای اسلامی)
  • World Events: 200+ international observances (رویدادهای جهانی)

License

MIT License - see LICENSE file for details

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Steps to contribute:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit changes (git commit -m 'Add AmazingFeature')
  4. Push to branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Support

For issues, questions, or feature requests, please open an issue on GitHub.

Need help? Check the Documentation or review the Examples.

Credits

Built with Vue 3 and TypeScript for the Persian-speaking community and beyond.