ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

bug: Calendar month changes when selecting date on Multiple date mode

Open jongbonga opened this issue 2 years ago • 1 comments

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

When using the Calendar on multiple date mode, if the initial month is November, selecting a date from a different month navigates the view back to the initial month.

Expected Behavior

The calendar month should not navigate automatically when selecting dates from a month that different from the default one.

Steps to Reproduce

  1. Open page with multiple date calendar
  2. Navigate to a different month
  3. select a date

Code Reproduction URL

https://ionicframework.com/docs/api/datetime#multiple-date-selection

Ionic Info

Ionic:

   Ionic CLI                     : 6.20.9 (/Users/jonathan/.nvm/versions/node/v16.14.0/lib/node_modules/@ionic/cli)
   Ionic Framework               : not installed
   @angular-devkit/build-angular : 16.2.10
   @angular-devkit/schematics    : 16.2.10
   @angular/cli                  : 16.2.10
   @ionic/angular-toolkit        : 10.0.0

Capacitor:

   Capacitor CLI      : 5.5.1
   @capacitor/android : 5.5.1
   @capacitor/core    : 5.5.1
   @capacitor/ios     : 5.5.1

Utility:

   cordova-res : 0.15.4
   native-run  : 2.0.0

System:

   NodeJS : v16.14.0 (/Users/jonathan/.nvm/versions/node/v16.14.0/bin/node)
   npm    : 8.3.1
   OS     : macOS Unknown

Additional Information

No response

jongbonga avatar Nov 29 '23 20:11 jongbonga

Thanks for the report. The problem here is we animate to the new date when the value is changed, but we do not account for multiple selection. This behavior is valuable for when the value is set asynchronously on a different month than what it shown.

However, this is confusing when there are multiple dates selected because we do not reasonably know which date to animate to.

liamdebeasi avatar Nov 29 '23 21:11 liamdebeasi

This has been resolved via https://github.com/ionic-team/ionic-framework/pull/28847 and the fix will be available in a future release of Ionic Framework. Thank you!

averyjohnston avatar Jan 18 '24 18:01 averyjohnston

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

ionitron-bot[bot] avatar Feb 17 '24 19:02 ionitron-bot[bot]