Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

[major] Picker 'almost' always picks 'pm' values instead of 'am' #17

Open
Enngage opened this issue Jul 9, 2018 · 6 comments
Open

[major] Picker 'almost' always picks 'pm' values instead of 'am' #17

Enngage opened this issue Jul 9, 2018 · 6 comments

Comments

@Enngage
Copy link

Enngage commented Jul 9, 2018

Hi, this is quite a major issue as in my culture with 24 hour format ('cs' - though it likely behaves like this in all of them) the picker almost always picks 'pm' value (i.e. 3pm) instead of 'am' (i.e. 3am) even though I'm clicking on 'am' values. See example:

incorrect_date

In the first case, I'm selecting '2' and in properly selects '2' am. However, if I go back to hour selection and select '3' it selects '3' pm instead of am. Subsequent cases behave the same.

This is a major showstopper, could you please look into this?

@Enngage Enngage changed the title Picker 'almost' always picks 'pm' values instead of 'am' [major] Picker 'almost' always picks 'pm' values instead of 'am' Jul 9, 2018
@adelchi
Copy link

adelchi commented Jul 13, 2018

tried to fix it, its not well tested though
adelchi@0f6e73a

@Askiater
Copy link

@Enngage a little off-topic, but how you change month and year to a different language?
(For Cancel and Ok button I guess you just change datepicker-intl.ts, but how did you do that for month and year?)

@Enngage
Copy link
Author

Enngage commented Jan 29, 2019

@Askiater, if I remember correctly this is because I was using moment adapter for Angular material and using it with this datepicker as well. Since then I've however switched to Luxon because the size impact of Moment and its locales (it adds more then 1MB to your Angular bundle size - and that is compiled). I advice you do the same as soon as you can and run away from Moment. This library, as far as I know, does not support changing date adapter so you would have to look elsewhere.

@Askiater
Copy link

@Enngage, thank you for your advice. Right now I (for test) delete moment from dependencies and bundle size decreased for ~0.8MB. That's kinda shocked me. In the next project, I definitely try to use something else, but for now, I need something compatible with Material Design (in design style) and Angular with customizable language support =/

@makkaronis4e
Copy link

Is here any chance, that this critical bug will be fixed? Or this library abandoned?

@Enngage
Copy link
Author

Enngage commented Oct 19, 2019 via email

adelchi pushed a commit to adelchi/npm-datepicker that referenced this issue Aug 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

5 participants