bug: Cannot read property ‘length’ of undefined at divyColumns – Ion-datetime

Bug Report

Ionic version:

[x] 5.x

Current behavior:

Datepicker doens’t open when pass shortMonthNames. One of functions can’t read text of last colunm

Steps to reproduce:

Download and run in normal procediments the following project: https://github.com/littlefish28/datepicker_bug
Try open ion-datetime

Other information:

I guess the component try to run for 13 slots instead of 12. Maybe something related with month numbers that starts with 1 and an array with 0. So when it’s check the number 12 (thirteenth slot), the bug appears. An workaround I’m using is pass a empty string in last slot, but this allows the user select an “empty year”
Ionic info:

Ionic:

   Ionic CLI                     : 6.7.0 (C:\Users\User\AppData\Roaming\npm\node_modules\@ionic\cli)
   Ionic Framework               : @ionic/angular 5.1.1
   @angular-devkit/build-angular : 0.901.7
   @angular-devkit/schematics    : 9.1.7
   @angular/cli                  : 9.1.7
   @ionic/angular-toolkit        : 2.2.0

Capacitor:

   Capacitor CLI   : 2.1.2
   @capacitor/core : 2.1.2

Utility:

   cordova-res : 0.13.1
   native-run  : 0.3.0

System:

   NodeJS : v13.10.1 (C:\Program Files\nodejs\node.exe)
   npm    : 6.13.7
   OS     : Windows 10

1 possible answer(s) on “bug: Cannot read property ‘length’ of undefined at divyColumns – Ion-datetime