app-extension-qdatetimepicker icon indicating copy to clipboard operation
app-extension-qdatetimepicker copied to clipboard

Displays 12:30am as 00:30am

Open andrewhl opened this issue 3 years ago • 9 comments

Even in the demo if I select 12:30 with either AM or PM, it displays as 00:30. I need to be able to display the time as 12:30 whether AM or PM, as I am using 12h time.

Screen Shot 2021-11-04 at 12 15 12 AM Screen Shot 2021-11-04 at 12 15 06 AM

How can I achieve this?

andrewhl avatar Nov 04 '21 04:11 andrewhl

what extension/version do u're using?

@toby.mosque/qdatetimepicker (compatible with v2)
qdatetimepicker (compatible with v1)

TobyMosque avatar Nov 04 '21 14:11 TobyMosque

qdatetimepicker. Is this issue resolved in v2? Because I am planning to upgrade to quasar v2 soon anyway.

andrewhl avatar Nov 04 '21 15:11 andrewhl

probably not, but i need to know where to look first.

TobyMosque avatar Nov 04 '21 16:11 TobyMosque

This is sometimes browser-dependent.

Go here: https://codepen.io/Hawkeye64/pen/VwzXwXK

Try different browsers. 24 is not a valid value for an hour, but 00 is. The closest to get what you want is to use am/pm and specify 12:03 am

hawkeye64 avatar Nov 05 '21 19:11 hawkeye64

@hawkeye64 Hi. I can reproduce the issue on the latest versions of Chrome, Firefox, and Safari. Doesn't seem like a browser-specific issue.

My apologies, but I'm not understanding your response. What do you mean use 'am/pm' and specify 12:03am? I'm using the am/pm in the qdatetimepicker component already. I'm also not clear on your codepen. I see you've included an input field with a time attribute but please can you clarify how this applies to the bug in question?

andrewhl avatar Nov 06 '21 05:11 andrewhl

Did you try entering 24?

hawkeye64 avatar Nov 06 '21 12:11 hawkeye64

@hawkeye64 Yes? I'm still not understanding the relevance. This is not a function of anything I am or am not doing; this is an issue with the native functionality with this component. No 12h digital clock should display 12:30am/pm as 00:30.

andrewhl avatar Nov 06 '21 14:11 andrewhl

@TobyMosque Hi there. Any word on this one?

andrewhl avatar Nov 10 '21 01:11 andrewhl

I'll take a look at this, but there are a lot of conversions from/to ISO ( and the 12 thing is just unnatural - how 12 "pm" comes before 1 "pm" ?), so this will take quite a while to adjust the functions.

TobyMosque avatar Nov 11 '21 00:11 TobyMosque