pglejzer / timepicker-ui

timepicker-ui is an easy library with timepicker. Fully wrote with TypeScript. This library is based on Material Design from Google.
MIT License
62 stars 18 forks source link

Issue changing hour #25

Closed Polm90 closed 2 years ago

Polm90 commented 2 years ago

I'm using the timepicker with the following configuration:

{
            cancelLabel: 'cancel',
            clockType: '24h',
            mobile: false,
            okLabel: 'ok',
            hourMobileLabel: '',
            minuteMobileLabel: '',
            mobileTimeLabel: 'select time',
            selectTimeLabel: 'select time',
            backdrop: true,
            editable: true,
            preventDefault: false,
            enableSwitchIcon: true,
            iconTemplate: '<div class="keyboard-time"></div>',
            iconTemplateMobile: '<div class="clock-time"></div>'
        }

If I do the following steps: 1) open the picker 2) select an high hour (p.e. 15) 3) change picker type (bottom left button) 4) click on the hour (trying to typing the hour) I receive the following error in console: Uncaught TypeError: Cannot read properties of null (reading 'classList') at y._setCircleClockClasses24h

If I do the following steps: 1) open the picker 2) select an high hour (p.e. 15) 3) change picker type (bottom left button) 4) change again the picker time 5) press 'ok' 6) try to open again the picker

I receive the following error in console (and the picker doesn't open anymore): Uncaught TypeError: Cannot read properties of null (reading 'classList') at y._setCircleClockClasses24h

pglejzer commented 2 years ago

Thanks again for the report this bug, I'm looking into that problem now.

pglejzer commented 2 years ago

which version do you use? Are you also using react/vue or just plain js/ts?

Polm90 commented 2 years ago

which version do you use? Are you also using react/vue or just plain js/ts?

Last one (2.4.5). Plain js.

pglejzer commented 2 years ago

I almost fixed all bugs, I also found a few more and I'm trying to fix them. I will try to make new version asap but no later than tomorrow