0.0.21 • Published 7 years ago

ngform-calendar v0.0.21

Weekly downloads
-
License
ISC
Repository
-
Last release
7 years ago
0/ Install

ngFormCalendar is working hand to hand with moment Install: npm install ngform-calendar npm install moment

import it where you need it this way: import * as moment from "moment"

1/ Import :
import {RxjsCalendarModule} from "ngform-calendar"
2/ Import it in your module
 imports: [
    AppRoutingModule,
    RxjsCalendarModule,
    RouterModule,
    SharedModule,
    BrowserModule
 ]
3/ Try it

-- html :

 <cal-calendar-vertical [options]="options" [ngFormControl]="formTest.controls.date">
    <form [formGroup]="formTest">
        <input type="text" formControlName="date">
    </form>
</cal-calendar-vertical>

-- component.ts :

 this.formTest = new FormGroup({
      date: new FormControl()
    })
    this.options = {
      maxDate: moment("2022-10-12"),
      minDate: moment("1825-11-13"),
      forbiddenDates: [],
      defaultdate: moment()
    }
		```