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

Datatable date filter throws uncaught error when invalid date string is entered #1392

Closed
csworthington opened this issue Jul 29, 2021 · 0 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@csworthington
Copy link

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/primevue/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=110

CodeSandbox Case (Bug Reports)
https://codesandbox.io/s/primevue-datatable-filter-date-bug-3u79j

Current behavior

When an invalid date string is inputted to the date filter box, and the filter is applied, an uncaught error is thrown. Sometimes, this error will cause the entire Datatable component to disappear from the page (Note: The Datatable does not disappear in the Code Sandbox, but the error is still thrown. The disappearing table can be observed on the datatable filter showcase page)

Expected behavior

The filter would handle the invalid input gracefully, or throw a more specific error

Minimal reproduction of the problem with instructions

  1. Open the filter menu for the date column
  2. In the datepicker, enter an invalid date string (such as "asdf")
  3. Click "Apply"

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

  • Vue version: 3.1.5

  • PrimeVue version: 3.6.0

  • Browser: Chrome 92, Firefox 90

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

4 participants