axa-ch-webhub-cloud / pattern-library

AXA CH UI component library. Please share, comment, create issues and work with us!
https://axa-ch-webhub-cloud.github.io/plib-feature/develop
126 stars 18 forks source link

Latest version of react datepicker doesn't show month and year dropdown #2389

Closed veljko3ap closed 1 year ago

veljko3ap commented 1 year ago

Starting from the latest version of Datepicker dropdowns for months and years are not displayed anymore in our latest eSalesP web app for vehicle insurance.

Expected Behavior

Dropdowns for months and years should be displayed in datepicker.

Current Behavior

At the moment users are not able to select desired month and/or year in datepicker.

Steps to Reproduce

  1. visit either prod version https://www.axa.ch/de/rechner/autoversicherung.html#/start or preprod version https://www.acc.axa.ch/de/rechner/autoversicherung.html
  2. Navigate to the screen that asks for contract begin date (e.g. https://www.axa.ch/de/rechner/autoversicherung.html#/begin-date)
  3. Try to select month and year in AXA's react datepicker

Context (Environment)

This happens in all environments localhost, prod. OS, browser doesn't matter.

Possible Solution

Pass on pod name as version suffix to dropdown inside datepicker?

MKaHead commented 1 year ago

Thank you @veljko3ap. We will check it.

MKaHead commented 1 year ago

@markus-walther

 const versionInfo = __VERSION_INFO__;
 defineVersioned([AXADropdown], {'axa-dropdown': versionInfo['axa-datepicker']});

is a workaround at the end of the datepicker's constructor. Unless we understand deeper why the bug suddenly occurred, we could split defineVersioned into simpler-to-understand individual functions that each handle one versioning subcase only. Note, though, that we have to care about the case of multiple PL dependencies in a given component (not evidenced by the datepicker, but elsewhere, e.g. axa-top-content-bar).

markus-walther commented 1 year ago

We are aware of this bug and will work on it as soon as we have capacity. In the meantime, npm versions prior to the bug are of course usable - please use them wisely for your applications.

amir-ag commented 1 year ago

This issue was fixed with the latest release of the datepicker v17.1.5 as shown here.

Screenshot 2023-02-21 at 13 35 14