https://github.com/me-majidi/ng-jalali-calendar
:calendar: Angular Jalali Calendar
https://github.com/me-majidi/ng-jalali-calendar
angular angular6 calendar calendar-component jalali-calendar
Last synced: 28 days ago
JSON representation
:calendar: Angular Jalali Calendar
- Host: GitHub
- URL: https://github.com/me-majidi/ng-jalali-calendar
- Owner: me-majidi
- Created: 2018-07-27T10:03:40.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-06T12:12:18.000Z (over 6 years ago)
- Last Synced: 2025-04-02T19:44:30.824Z (about 1 month ago)
- Topics: angular, angular6, calendar, calendar-component, jalali-calendar
- Language: TypeScript
- Homepage: https://me-majidi.github.io/ng-jalali-calendar/
- Size: 718 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![]()
Ng-Jalali-Calendar
Jalali calendar for Angular4+ applications
![]()
## Table of contents
- [Online Demo](https://me-majidi.github.io/ng-jalali-calendar/)
- [Installation](https://www.npmjs.com/package/ng-jalali-calendar#installation)
- [Usage](https://www.npmjs.com/package/ng-jalali-calendar#usage)
- [API](https://www.npmjs.com/package/ng-jalali-calendar#api)
- [Example](https://www.npmjs.com/package/ng-jalali-calendar#example)
## Installation
```shell
npm install --save ng-jalali-calendar
```## Usage
Import `NgJalaliCalendarModule` in your module```typescript
import { NgModule } from '@angular/core';
import { NgJalaliCalendarModule } from 'ng-jalali-calendar'@NgModule({
imports: [ NgJalaliCalendarModule ]
})
export class YourModule { }
```
afterward, add the `ng-jalali-component` tag into the component where you want to use the calendar :
```html
```## API
**Inputs:**Input | Type | Description
--- | --- | ---
selectedDates | String[] | dates that you want to be selected on the calendar**Events:**
| Output | $event | Description |
| --- | ---- | --- |
| dateSelected | String | emitted when selecting a date |> the module works with dates in `YYYY/MM/DD` format
## Example
```typescript
import { Component, OnInit } from '@angular/core';
@Component({
selector : 'app-example',
templateUrl: './example.component.html',
styleUrls : [ './example.component.css' ]
})
export class ExampleComponent implements OnInit {
selectedDate: string = '';
selectedDates: string[] = [
'1397/5/22',
'1397/12/1'
'1397/01/5'
];
constructor () {}
ngOnInit () {
}
onSelectDate(event: string) {
this.selectedDate = event;
}
}
``````html
```