traingenerator icon indicating copy to clipboard operation
traingenerator copied to clipboard

Next month selection dates bring me back to current month in ion2-calendar

Open prakashbarik90 opened this issue 4 years ago • 0 comments

I have added below library for calendar to pick dates as single, multi and range. Here is the link, https://github.com/HsuanXyz/ion2-calendar/tree/v2

My HTML code:

<ion-item no-padding>
            <ion-calendar [(ngModel)]="dateMulti" [options]="optionsMulti" [type]="'string'" [format]="'YYYY-MM-DD'"
              (onChange)="selectedMultiDates($event)">
            </ion-calendar>
          </ion-item>

TS code:

export class CalendarBookPage {

optionsMulti: CalendarComponentOptions = {
    pickMode: 'multi'
  };

constructor(){}

selectedMultiDates(dates) {
    this.dateMulti = JSON.parse(JSON.stringify(dates));
}

ionic version:3.20.0

Basically when i click on next month and select on any date(s) it redirect me to current month. So here i want to stay on next month with highlighting of selected dates.

Can you please let me know, how could i do that with this library?

prakashbarik90 avatar Jul 06 '20 11:07 prakashbarik90