ir-datetimepicker
TypeScript icon, indicating that this package has built-in type declarations

1.2.2 • Public • Published

ir-datetimepicker

Angular 6 persian datetime picker

Usage

  1. Install from npm:
npm install ir-datetimepicker --save
  1. Import IrDateTimePickerModule to app.module.ts:
import { IrDateTimePickerModule } from 'ir-datetimepicker';
@NgModule({
    declarations: [
        AppComponent
    ],
    imports: [
        IrDateTimePickerModule
    ],
    bootstrap: [AppComponent]
})
export class AppModule { }
  1. Now use this in your html:
<ir-datetimepicker></ir-datetimepicker>

Attributes

Attr Type Default Description Sample
placeholder string '' Placeholder for the text input [placeholder]="'تاریخ'"
showTimer boolean false Show timer with date [showTimer]="true"
justTime boolean false Show just timer and hides date [justTime]="true"
readonly boolean false Make the input readonly [readonly]="true"
disableBeforeToday boolean false Disable use from selecting date before today [disableBeforeToday]="true"
(ngModel) string '' You can also use ngModel [(ngModel)]="1397/01/23"

Events

Event Description Sample
onchange() Change event that trigger on input and date selection (onchange)="changeDate($event)"

$event contains these keys:

Key Description
jDate Jalali Date
gDate Gregorian Date
time Time
fullDate Full date with time
invalid If the date input is invalid it will be false

Package Sidebar

Install

npm i ir-datetimepicker

Weekly Downloads

3

Version

1.2.2

License

none

Unpacked Size

833 kB

Total Files

29

Last publish

Collaborators

  • withoutbrain1994