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

Calendar TimeOnly incorrect hourformat #2693

Closed
sudheerj opened this issue May 4, 2017 · 11 comments
Closed

Calendar TimeOnly incorrect hourformat #2693

sudheerj opened this issue May 4, 2017 · 11 comments
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@sudheerj
Copy link
Contributor

sudheerj commented May 4, 2017

When we use calendar time picker with time only option and hourformat="12" then it displays popup with incorrect AM/PM display.It always display AM in time picker popup as below.

<p-calendar [(ngModel)]="date8" [timeOnly]="true" [hourFormat]="12"></p-calendar>

image

@Mrtcndkn Mrtcndkn self-assigned this May 4, 2017
@Mrtcndkn Mrtcndkn added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label May 4, 2017
@Mrtcndkn Mrtcndkn added this to the 4.0.1 milestone May 4, 2017
@Mrtcndkn Mrtcndkn closed this as completed May 4, 2017
@ohsomofo
Copy link

I'm seeing the same behavior in 4.0.1. Did this fix not make it into the release?

@sudheerj
Copy link
Contributor Author

Are you able to replicate the issue on showcase? It worked for me. Please provide plunker example.

@adibbleWLT
Copy link

Same here, issue still present. I just updated and it is still not displaying PM.

@adibbleWLT
Copy link

I just threw this into a basic plunker. Same issue appears there:
http://plnkr.co/edit/omUctyZwccEM8mGnKaXM?p=preview

@eugenebuhor
Copy link

eugenebuhor commented May 23, 2017

Same behavior for me. AM/PM switch invokes only on hours step from 12 to 01. The rest steps display only AM. But the value of calendar is correct.
My version of primeNG is 4.0.1.

@IbrahimElkhatib
Copy link

Same behavior as @EugeneBugor described

@sudheerj
Copy link
Contributor Author

sudheerj commented May 24, 2017

The above issue is related to AM/PM format for time picker popup. This issue is not related to AM/PM display in input field(DatePicker and TimePicker).

Please create a separate issue with the details.

@eugenebuhor
Copy link

eugenebuhor commented May 24, 2017

@sudheerj , added a new issue related to my problem https://github.com/primefaces/primeng/issues

@adibbleWLT
Copy link

Just wondering, as this issue still says closed, but has never been fixed. Is someone looking into this?

@rich4756
Copy link

@Mrtcndkn Tested on 4.2.1, same issue is present.

<p-calendar [showTime]="true" [hourFormat]="12" [(ngModel)]="startDate" placeholder="Start Date" [minDate]="oneYearAgo" [maxDate]="today" [showIcon]="true" [readonlyInput]="true"></p-calendar>

Can we reopen?

@nitishGE
Copy link

nitishGE commented Oct 3, 2018

I am facing the same issue. At output += date.getHours() > 11 ? ' PM' : ' AM'; why are we not considering the user selected AM/PM value. Rather we are taking it from system time. This is where the issue comes.

Issue should be re-opened.

During selection:
image

Output:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

8 participants