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 Calendar component #7190

Closed
ghost opened this issue Jan 31, 2019 · 2 comments
Closed

Bug in Calendar component #7190

ghost opened this issue Jan 31, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Jan 31, 2019

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

Current behavior
If the calendar is used in touch ui mode and the button bar, when the clear button is clicked, the overlay is not removed. I made a workaround in my component. Remove the overlay with jQuery, but then, when I select a Date, an error appears in the console when the component tries to remove the overlay.
Solution:

$('.ui-widget-overlay.ui-datepicker-mask.ui-datepicker-mask-scrollblocker').remove();

Error:
ERROR DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node. at Calendar.push../node_modules/primeng/components/calendar/calendar.js.Calendar.disableModality (http://localhost:4200/vendor.js:111949:27) at http://localhost:4200/vendor.js:111218:27 at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (http://localhost:4200/polyfills.js:2768:31) at Object.onInvokeTask (http://localhost:4200/vendor.js:62292:33) at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (http://localhost:4200/polyfills.js:2767:60) at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (http://localhost:4200/polyfills.js:2540:47) at push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask (http://localhost:4200/polyfills.js:2843:34) at ZoneTask.invoke (http://localhost:4200/polyfills.js:2832:48) at timer (http://localhost:4200/polyfills.js:4626:29)

Expected behavior
When the clear button is clicked, the overlay must be removed.

Minimal reproduction of the problem with instructions
<p-calendar [(ngModel)]="date" appendTo="body" dateFormat="dd/mm/yy" [touchUI]="true" [showIcon]="true" showButtonBar="true" baseZIndex="1051" (onClearClick)="removeDateFilter('start_date')">

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

Please tell us about your environment: Windows 10, Visual Studio code, webpack, node 9.8.0, npm 5.6.0.

  • Angular version: 7.2.2
  • PrimeNG version: 7.0.4
  • Browser: [Chrome 71 | Firefox 64]
  • Language: [TypeScript 3.1.1 | ES5]
@ghost
Copy link
Author

ghost commented Jan 31, 2019

Ok, I just see the Pull request #7175 and the disableModality() method. I don't know if this feature goes with next release. I keep this issue open until a collaborator confirm it. Thanks.

@cagataycivici
Copy link
Member

#7170

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant