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

hijri-datepicker-component

v0.0.10

Published

Forked and enhanced version of datepicker-hijri with additional features. The 'Hijri Datepicker' is a user interface component designed to facilitate the selection and display of Hijri (Islamic) dates in applications. It offers a visual calendar interface

Downloads

536

Readme

Built With Stencil

Forked and enhanced version of datepicker-hijri with additional features.

Hijridate picker web component, simple and can be integrated easily with any frameworks. (محدد التاريخ الهجري)

This package created to support my company project and been updated with a CR or Bugs created by our testers

Feel free to request or enhance the code with a PR.

Installation

Stand alone:

  • Use NPM
 npm i hijri-datepicker-component
  • Use CDN
<script src="https://cdn.jsdelivr.net/npm/hijri-datepicker-component@latest/dist/datepicker-hijri/datepicker-hijri.js"></script>
  • Download files
  1. Download all files in the build directory
  2. Include the script datepicker-hijri.js file like in the code below
<script src="build/datepicker-hijri.js"></script>

Usage

Attributes:

| name | required | description | |-----------------|----------|-------------| | reference | yes | an identifier for the element where the datepicker will appear it must be an id for an html element | | placement | no | the placement of the the datepicker 'bottom', 'top', 'right', 'left' and 'auto' default: bottom, you can use any placement in popper.js | | date-format | no | the date format, it is string, default: iYYYY/iMM/iDD, any format in moment-hijri will work| | selected-date | no | the selected date it is string with the same format of date-format prop | | placeholder | no | | | on-date-select-close | no | if you want the datepicker to disapeare on chosing the date only add | | auto-set-selected-date | no | if you want the datepicker to auto send initial value for today | | min-date | no | if you want the datepicker to set minimum date | | max-date | no | if you want the datepicker to set maximum date |

Example

In the Example below the input with id calender is the reference for the datepicker-hijri web component, so if you click or focus on the input the datepicker will be shown.

<input type="text" id="calender">
<datepicker-hijri reference="calender" placement="bottom" date-format="iYYYY/iMM/iDD" selected-date="1441/02/01"></datepicker-hijri>

Event onchange

in any change on the date, will be firing a change event. so you can listen and respond to the change.

<input type="text" id="calender" onchange="console.log('changed')">
                                <!-- ^^^^^^^^ -->
<datepicker-hijri reference="calender" placement="bottom" date-format="iYYYY/iMM/iDD" selected-date="1441/02/01"></datepicker-hijri>

Demo

Codepen Hijridate picker

Demo Image

how it works

So the datepicker shown and every thing is good, but what is happening, when the user chooses the day, the datepicker will modify the attribute value on the reference with the new value.

Credits

  • @xsoh Thank for the awesome package moment-hijir.
  • @FezVrasta Thank you for the package popper.js.