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

useTwentyfourHour not working properly #2395

Closed
ThiagoLAMF opened this issue Sep 9, 2021 · 3 comments · Fixed by #2396
Closed

useTwentyfourHour not working properly #2395

ThiagoLAMF opened this issue Sep 9, 2021 · 3 comments · Fixed by #2396
Labels
State: planned This ticket is planned to be worked on. Type: Bug v6
Milestone

Comments

@ThiagoLAMF
Copy link
Contributor

When setting useTwentyfourHour = true, i am getting some unexpected results.

https://stackblitz.com/edit/js-nvfv2k

When the page loads and i first click in the component, it sets the date for today: "09/09/2021, 18:13"

Then i opened the datepicker and clicked to select the hour, without using the arrows or the keyboard. Then i clicked in "01" and got the output: "09/09/2021, 13:13".

I think the output should be "09/09/2021, 01:13"

@hkvstore
Copy link
Contributor

I found similar problem too. If the options are, e.g.

      const datetimepicker1 = new tempusDominus.TempusDominus(document.getElementById('datetimepicker1'), {
        display: { components: { seconds: true , useTwentyfourHour: true } }
      });

The result is like:
err1

@Eonasdan Eonasdan added Type: Bug State: planned This ticket is planned to be worked on. v6 labels Sep 13, 2021
@Eonasdan Eonasdan added this to the Version 6 milestone Sep 13, 2021
@Eonasdan
Copy link
Owner

Thanks @ThiagoLAMF for the pr. It's merged.

@hkvstore I've verified your issue and I'll have this fixed in my next pushed

@Eonasdan
Copy link
Owner

@hkvstore I think I fixed your issue in the latest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
State: planned This ticket is planned to be worked on. Type: Bug v6
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants