angular-jalali-date-picker-ma v1.0.4
The problem
In multi-language projects, find a suitable datepicker in too hard if your project needs to support persian.
This solution
I built this datepicker that supports these languages and also easy to use.
Table of Contents
Installation
This module is distributed via npm which is bundled with node and
should be installed as one of your project's dependencies
:
npm install --save angular-jalali-date-picker-ma
This package also depends on
angular
. Please make sure you have it installed as well.
Usage
in app.module.ts import it :
import {DpDatePickerModule} from 'angular-jalali-date-picker-ma';
@NgModule({
...,
imports: [DpDatePickerModule]
})
in your component template use like this :
<dp-date-picker dir="rtl" [(ngModel)]="model" mode="daytime" placeholder="Placeholder" theme="dp-material"> </dp-date-picker>
and in your component.ts declare props:
export class AppComponent {
model = "";
}
Basic Props
This is the list of props that you should probably know about.
lang
string
| optional This is used to change language of the datepicker, that accepts 'en' and 'fa','en': for English and 'fa' for Persian
change
function(date: any)
This is return a Unix Time when change date in datepicker