Skip to content

Not able to set time format of datetime picker to 24 hour notation #4243

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

Closed
joost-florijn-kega opened this issue Apr 20, 2016 · 3 comments
Closed
Assignees

Comments

@joost-florijn-kega
Copy link
Contributor

Steps to reproduce

  1. Install Magento from develop branch.
  2. Add Date Form field to an Admin Form with time format 'HH:mm'.

Expected result

  1. Able to select time in 24 hour notation.

Actual result

  1. The time is always converted to the 12 hour notation.
    image

I have found why this is happening. In calendar.js at row 380 there are dateTimeFormat defined that are used to convert date and time format string.

In the documentation of the jquery time picker addon you can read that 'HH' stand for the 24 hour notation and 'hh' notation. The calendar widget forces you to use the 12 hour notation instead to leave it up the developer.

@mazhalai
Copy link
Contributor

@joost-florijn-kega thank you for reporting, we have created MAGETWO-52178 to investigate and fix.

@mazhalai mazhalai added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development CS labels Apr 21, 2016
magento-team pushed a commit that referenced this issue May 6, 2016
@guz-anton
Copy link
Contributor

guz-anton commented May 10, 2016

Please notice that e6f9261 doesn't fix issue. We'll deliver proper fix under MAGETWO-52590.
The main issue that on client side there is no necessity to replace HH to hh.

@guz-anton guz-anton added bug report and removed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development labels May 13, 2016
magento-team pushed a commit that referenced this issue May 13, 2016
- Format for literals 'H', 'h', 's', 'm' has same meaning in different parsers
@guz-anton
Copy link
Contributor

@joost-florijn-kega you can review issue.
52e6fd6 delivered to develop branch.

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

No branches or pull requests

3 participants