anglar-datepicker
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

Datepicker

Installation

To install this library, run:

$ npm install anglar-datepicker --save

Consuming your library

Add the below line in app.module.ts
  import { AngularDatepickerModule } from 'anglar-datepicker';
And this import in app.module.ts
imports: [
    BrowserModule,
    AngularDatepickerModule, <-- here
    CommonModule,
    FormsModule
  ],

How to use it for Model based input

<anglar-datepicker 
[position]="'top'" 
[dateFormat]="'DD-MM-YYYY'" 
(onDateSelction)="getDateObject($event)" 
 [(ngModel)]="myInput"></anglar-datepicker>

How to use it for Reactive form based input

<form [formGroup]="myfrmGroup">
 <anglar-datepicker 
  [position]="'top'" 
[dateFormat]="'DD-MM-YYYY'" 
(onDateSelction)="getDateObject($event)" 
formControlName="myInput" ></anglar-datepicker>

</form>

Input and Output

  • @Input - position (optional) - bottom | top | left | right - Default bottom
  • @input - dateFormat (optional) - Any Moment Js based date format - Default DD-MMM-YYYY
  • @output - onDateSelect - Outputs Moment Object

LICENSE

It currently supports ngModel in the text input element and the support for reactiveform is pending still.

License

MIT © Sudhakar Pilavadi

Keywords

Angular Datepicker, Angular 6 Datepicker, Angular 7 Datepicker, Angular 5 Datepicker

Readme

Keywords

none

Package Sidebar

Install

npm i anglar-datepicker

Weekly Downloads

0

Version

0.0.1

License

none

Unpacked Size

234 kB

Total Files

26

Last publish

Collaborators

  • sudhakarsp06