Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot read property 'replace' of null on 24 Hrs format #341

Closed
faran-tenovos opened this issue May 14, 2020 · 7 comments
Closed

cannot read property 'replace' of null on 24 Hrs format #341

faran-tenovos opened this issue May 14, 2020 · 7 comments

Comments

@faran-tenovos
Copy link

I'm on angular 9.2.x and I've tried most versions up to 5.5.2. Here is how I reproduced the bug.
-> Select any time other than 00:xx
-> Open Time Picker again select any time ranging in 00:xx
-> Now the Time Picker puts the value as 24:xx and opening it again it breaks.

image

@Agranom
Copy link
Owner

Agranom commented May 18, 2020

I'll check it

@anjaliTandel20
Copy link

I am getting the same issue while opening it again on edit mode.

@EdgarsJoja
Copy link

I had very similar issue. In my case this happened due to saving value in DB time column, which transformed it to H:i:s format (xx:yy:zz) and such error appeared when this value was being passed back for editing. Simple solution was to make sure that the retrieved value is in H:i (xx:yy) format.
Not sure if this would work for original 00:xx issue, but maybe it helps someone due to error message being basically the same.

@Agranom
Copy link
Owner

Agranom commented May 28, 2020

Fixed in v5.5.3

@Agranom Agranom closed this as completed May 28, 2020
@noamyg
Copy link

noamyg commented Jul 9, 2020

Still having this problem in 5.5.3 (however, this happens when an invalid format is provided as @EdgarsJoja suggested.

@kiknadze
Copy link

image
Angular 12

@kiknadze
Copy link

Before open time component, I check if time format is correct.
It works for me:

if (!moment(this.value, 'HH:mm', true).isValid()) this.value = null;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants