1.2.2 • Published 5 years ago

ir-datetimepicker v1.2.2

Weekly downloads
25
License
-
Repository
-
Last release
5 years ago

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

AttrTypeDefaultDescriptionSample
placeholderstring''Placeholder for the text inputplaceholder="'تاریخ'"
showTimerbooleanfalseShow timer with dateshowTimer="true"
justTimebooleanfalseShow just timer and hides datejustTime="true"
readonlybooleanfalseMake the input readonlyreadonly="true"
disableBeforeTodaybooleanfalseDisable use from selecting date before todaydisableBeforeToday="true"
(ngModel)string''You can also use ngModel(ngModel)="1397/01/23"

Events

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

$event contains these keys:

KeyDescription
jDateJalali Date
gDateGregorian Date
timeTime
fullDateFull date with time
invalidIf the date input is invalid it will be false