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

angular-hijri-gregorian-datepicker

v0.0.7

Published

* Robust and tested code angular hijri/gregorian calendar/datepicker component for Angular 7 - 12, 13, 14+ projects. * Ionic 3, 4, 5 + is supported, can be used in iOS and Android

Downloads

51

Readme

Angular Hijri Gregorian Calendar(Datepicker)

  • Robust and tested code angular hijri/gregorian calendar/datepicker component for Angular 7 - 12, 13, 14+ projects.
  • Ionic 3, 4, 5 + is supported, can be used in iOS and Android

Build Dependencies License

Preview

Examples/Demo

Online demo can be found here

Star it to inspire us to build the best component!

Features

  • Can be used only as a calendar or a datepicker.
  • RTL and LTR support
  • Easy to switch between Gregorian and Hijri calendars.
  • Ability to specify the default calendar type either Gregorian or Hijri.
  • Converting dates when changing type of calendar.
  • Ability to specify min and max value for Gregorian and Hijri.
  • Ability to make it required or readonly.
  • Very easy to customize.
  • Can select Multiple dates.
  • Event listeners for all datepicker events.
  • Can customize future and past years number.
  • Responsive desing for web and mobile.

Supported platforms

Angular 7, 8, 9, 10, 11, 12, 14 + Ionic 3, 4, 5 + Mobile browsers and WebViews on: Android and iOS Desktop browsers: Chrome, Firefox, Safari, Edge v.79 + Other browsers: Edge v.41 - 44 (without code hidden feature)

Installation

$ npm install angular-hijri-gregorian-datepicker

Usage

Import HijriGregorianDatepickerModule in your app module or page module:

import { HijriGregorianDatepickerModule } from 'angular-hijri-gregorian-datepicker';

@NgModule({
  imports: [
    // ...
    HijriGregorianDatepickerModule
  ]
})
<hijri-gregorian-datepicker
  [canChangeMode]="true"
  [todaysDateSection]="true"
  [futureValidation]="false"
  [disableYearPicker]="false"
  [disableMonthPicker]="false"
  [disableDayPicker]="false"
  [multiple]="false"
  [isRequired]="true"
  [mode]="'hijri'"
  [dir]="'ltr'"
  [locale]="'en'"
  [submitTextButton]="'Confirm'"
  [todaysDateText]="'Todays\'s Date'"
  [hijriDateText]="'Hijri Date'"
  [pastYearsLimit]="20"
  [futureYearsLimit]="0"
  [styles]="stylesConfig"
  (onSubmit)="onSubmitTest($event)"
  (onDaySelect)="onChangeTest($event)"
  (onMonthChange)="onMonthChangeTest($event)"
  (onYearChange)="onYearChangeTest($event)"
></hijri-gregorian-datepicker>

Inside your component.ts:

  // this called every time when user confirms a selected date
    onSubmitEvent(code: string) {
    }

    // this called only every time the use selects a date
    onChangeEvent(code: string) {
    }

    // this called every time the month value channges
    onMonthChangeEvent(code: string) {
    }

    // this called every time the year value channges
    onYearChangeEvent(code: string) {
    }

@Inputs()

| Property | Type | Default | Description | |----------|:-------:|:-----:|----------| | canChangeMode | boolean | true | When true the user can toggle calendar modes, if false the user has only one calendar mode | | todaysDateSection | boolean | true | When true the section with current today date will be shown, if false it will be hidden | | futureValidation | boolean | true | When true the user cannot choose any future dates, if false user can select future dates | | disableYearPicker | boolean | false | When true the user cannot select different years, if false year select will be enabled | | disableMonthPicker | boolean | false | When true the user cannot select different months, if false month select will be enabled | | disableDayPicker | boolean | false | When true the user cannot select days, if false days select will be enabled | | multiple | boolean | false | When true the user can select multiple days, if false only one date can be selected | | isRequired | boolean | true | When true the confirm button will be disabled until user selects a date, if false the button will be enabled | | showConfirmButton | boolean | trie | When true the confirm button will be displayed, if false it will be hidden | | mode | string | greg | Calendar mode, either hijri or greg | | dir | string | ltr | Layout direction, either ltr or rtl | | locale | string | en | The language of the calendar layout, either ar or en | | submitTextButton | string | Confirm | Confirm button text value | | todaysDateText | string | Todays\'s Date | Today's date text in todaysDateSection | | hijriDateText | string | Hijri Date | Hijri date text(checkbox) | | pastYearsLimit | number | 90 | indicates for the past years number you want to allow user to select from | | futureYearsLimit | number | 0 | indicates for the future years number you want to allow user to select from | | styles | object | 0 | indicates for the future years number you want to allow user to select from |

@Outputs()

| Output | Description | |----------|--------------------| | onSubmit | Will be called every time when a user submits a selected date | | onDaySelect | Will be called every time when a user selects new date | | onMonthChange | Will be called every time the month value changes | | onYearChange | Will be called every time the year value changes |

Dependencies

Angular hijri gregorian based on moment-hijri that supports coversion between Gregorian and Hijri calendars.

Contributing

Contributions are more than welcome!

License

MIT License

Copyright (c) 2022 Muhammad Hanafi