Search code examples
angulardateflatpickr

Pop up month calendar's all days are disabled in angularx - flatpickr


I am using 'angularx-flatpickr' to select date in angular form. When I clicked the input area and then pop up month view appear but all dates are disabled.

In my html file,

    <input 
          type="text"
          mwlFlatpickr
          [(ngModel)]="enddate"
          [altInput]="true"
          [convertModelValue]="true"
          altFormat = "F j,Y"
          dateFormat= "Y-m-d"
          class="form-control"
          [ngModelOptions]="{standalone: true}"
          (ngModelChange)="changeDate($event)">

I import this import { FlatpickrModule } from 'angularx-flatpickr'; to my app.module.ts and in my import array FlatpickrModule.forRoot(). My angular cli version is 7.2.1.

This is the output, enter image description here `

How can I solve this one?


Solution

  • Try downgrading the flatpickr version. This worked for me. I am currently using the v4.6.6 of flatpickr