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

24hr format, invalid dateTime - Issuse #285 appeared again #342

Closed
darkovuj opened this issue May 23, 2020 · 8 comments
Closed

24hr format, invalid dateTime - Issuse #285 appeared again #342

darkovuj opened this issue May 23, 2020 · 8 comments

Comments

@darkovuj
Copy link

this issue appeared again

#285

I'm using version 5.5.2 - downloaded few hours ago.

@Agranom
Copy link
Owner

Agranom commented May 24, 2020

Can you reproduce on the demo page? https://agranom.github.io/ngx-material-timepicker/

@darkovuj
Copy link
Author

Yes, demo page has this problem too

image

@Agranom
Copy link
Owner

Agranom commented May 26, 2020

Just provide a proper locale which supports 24h format

@darkovuj
Copy link
Author

Any hint how to do that? I already have
providers: [{ provide: LOCALE_ID, useValue: 'en-US' }],
in app.module.ts and it's working fine for the rest of the application. I think that 'en-US' supports 24h format

@antoinedelaplace
Copy link

Hello! I have the same issue with 24h format. On the demo page we have the same problem. When we select 00:00 we have 24:00 in the input value. And our locale supports 24hr format

@Agranom
Copy link
Owner

Agranom commented May 28, 2020

@darkovuj you don't need to override provider. NgxMaterialTimepickerModule.setLocale('uk-UA') will help.

Otherwise I'll try to convert from 24:00 to 00:00 by default when 24h format is selected

@darkovuj
Copy link
Author

Yes, this works.

Thanks.

@Agranom
Copy link
Owner

Agranom commented May 28, 2020

Fixed it. Now you'll get '00:xx' time with default locale. Update to the latest version

@Agranom Agranom closed this as completed May 28, 2020
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

3 participants