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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@rmanaf/jalali-datepicker

v1.0.3

Published

The jQuery Jalali Date Picker Plugin is a customizable date picker designed for Persian (Jalali) date selection in web applications. This lightweight and user-friendly plugin simplifies the process of capturing and formatting Persian dates, making it an i

Downloads

4

Readme

jQuery Jalali Date Picker Plugin

The jQuery Jalali Date Picker Plugin is a customizable date picker designed for Persian (Jalali) date selection in web applications. This lightweight and user-friendly plugin simplifies the process of capturing and formatting Persian dates, making it an ideal choice for projects targeting Persian-speaking users.

GitHub license GitHub issues

Installation

Before using the jQuery Jalali Date Picker Plugin, ensure you have the following dependencies installed:

You can include these dependencies in your project using script tags or package managers like npm or yarn.

<!-- Include jQuery -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

<!-- Include Moment.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js"></script>

<!-- Include Jalali Moment -->
<script src="path/to/jalali-moment.browser.js"></script>

Install jalali-datepicker using npm:

npm install @rmanaf/jalali-datepicker

Usage

To use the jQuery Jalali Date Picker Plugin, follow these steps:

  1. Include the required dependencies in your HTML file, as mentioned in the installation section.

  2. Include the jQuery Jalali Date Picker Plugin script in your HTML file:

<!-- Include the jQuery Jalali Date Picker Plugin -->
<script src="./dist/jalali-datepicker.js"></script>

<!-- Theme -->
<script src="./dist/themes/bs5.js"></script>
  1. Initialize the date picker on your input elements using jQuery. For example, if you have an input element with the ID "datepicker-input," you can initialize it like this:
$(document).ready(function() {
    $('#datepicker-input').jdatepicker({
        // Customize date picker options as needed
    });
});

Options

  • date: The initial date to display in the date picker.
  • format: The date format to use for display and input.
  • lang: The language/locale for the date picker (default is 'fa' for Persian).
  • theme: Custom CSS classes for styling the date picker. e.g. 'jdatepicker.theme.bs5'
  • events: Events that trigger the date picker (e.g., 'click').
  • container: The HTML element to which the date picker is appended.
  • prevMonthText: Text for the "previous month" button.
  • nextMonthText: Text for the "next month" button.
  • dayNames: Names of days of the week.
  • monthNames: Names of months.
  • yearRange: Range of selectable years.
  • placement: Position of the date picker relative to the input element.
  • weekend: Days of the week that are considered weekends.
  • minWidth: Minimum width of the date picker.
  • fullWidth: Whether the date picker should expand to the full width of the input element.
  • footer: Whether to display a footer with buttons.
  • today: Whether to include a "Today" button.
  • year: Whether to include a year selection dropdown.
  • month: Whether to include a month selection dropdown.
  • dayOfWeek: A function to customize the mapping of days of the week.
  • filterDigits: A function to filter and replace digits in input.
  • filterMonthName: A function to filter and replace month names in input.
  • beforeHeader: A function to customize content before the date picker header.
  • afterHeader: A function to customize content after the date picker header.
  • beforeFooter: A function to customize content before the date picker footer.
  • afterFooter: A function to customize content after the date picker footer.

Demo

See demo here