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

Bug in date equality causes wrong initialization of dropdown with date value #6469

Closed
cedricboidin opened this issue Sep 6, 2018 · 1 comment
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@cedricboidin
Copy link
Contributor

I'm submitting a ... (check one with "x")

[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Plunkr Case (Bug Reports)
https://stackblitz.com/edit/primeng-dropdown-pvgyuu?file=app%2Fapp.component.html

Current behavior
I create a dropdown in which options values are dates. The associated formControl was set an initial value : jan 1 2003. However, when the dropdown is first displayed, it shows jan 1 2001.

Expected behavior
The dropdown should show the label corresponding to the formControl value, jan 1 2003.

Minimal reproduction of the problem with instructions
Start the stackblitz

What is the motivation / use case for changing the behavior?
This behavior is due to a bug in date equality in ObjectUtils.ts

Please tell us about your environment:
standard

  • Angular version: 6.1.7

  • PrimeNG version: 6.1.3

  • Browser: all

  • Language: all

@cagataycivici
Copy link
Member

PR merged, thank you.

@cagataycivici cagataycivici self-assigned this Sep 18, 2018
@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Sep 18, 2018
@cagataycivici cagataycivici added this to the 6.1.4 milestone Sep 18, 2018
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

2 participants