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

Table Column Filter: Date is after sets hours to 00:00 #15684

Open
r3ps4J opened this issue May 23, 2024 · 1 comment
Open

Table Column Filter: Date is after sets hours to 00:00 #15684

r3ps4J opened this issue May 23, 2024 · 1 comment
Assignees
Labels
Resolution: Help Wanted Issue or pull request requires extra help and feedback
Milestone

Comments

@r3ps4J
Copy link
Contributor

r3ps4J commented May 23, 2024

Describe the bug

If you use filter date is after the date object's hours is set to 00:00. You can see the line of code doing this here:

value.setHours(0, 0, 0, 0);

I get that this is intentional, but instead of updating the actual date object I want to propose to use something a copy of the object. Not sure why this wasn't done before, as now you update data that you probably don't want to update. I might open a pull request myself if I find the time as this is 2 lines of codes to change.

Environment

Not relevant as it's hardcoded to set the time to 00:00.

But I noticed this error in a table using column filter.

Reproducer

No response

Angular version

^17.3.0

PrimeNG version

^17.17.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

v18.17.0

Browser(s)

No response

Steps to reproduce the behavior

  1. Filter a date with "Date is after".
  2. See the time being changed on all rows.

Expected behavior

The time should not be changed on the original object.

@r3ps4J r3ps4J added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label May 23, 2024
@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working LTS-PORTABLE Issue's fix will be ported to supported LTS versions and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels May 30, 2024
@cetincakiroglu cetincakiroglu modified the milestones: 17.18.0, 18.Future May 30, 2024
@mertsincan mertsincan added Resolution: Help Wanted Issue or pull request requires extra help and feedback and removed Type: Bug Issue contains a bug related to a specific component. Something about the component is not working LTS-PORTABLE Issue's fix will be ported to supported LTS versions labels Dec 25, 2024
@mertsincan mertsincan modified the milestones: 19.x, Future Dec 25, 2024
Copy link

Due to PrimeNG team's busy roadmap, this issue is available for anyone to work on. Make sure to reference this issue in your pull request. ✨ Thank you for your contribution! ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Help Wanted Issue or pull request requires extra help and feedback
Projects
Status: No status
Development

No branches or pull requests

4 participants