hsuanxyz / ion2-calendar

📅 A date picker components for ionic2 /ionic3 / ionic4
https://hsuanxyz.github.io/demo/ion2-calendar/
MIT License
555 stars 278 forks source link

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

Open prakashbarik90 opened 4 years ago

prakashbarik90 commented 4 years ago

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?