question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DatePicker: JavaScript error during ajax request

See original GitHub issue

Describe the defect The datePicker widget javascript contains the method “_destroy” which gets called during an ajax request when the component is rerendered. This destroy method calls 2 methods: this.restoreOverlayAppend() and this.onOverlayHide() - neither function seems to be defined anywhere and creates javascript errors.

Reproducer

Environment:

  • PF Version: 8.0
  • JSF + version: MyFaces 2.3.6
  • Affected browsers: ALL

To Reproduce Steps to reproduce the behavior:

  1. Setup page with example xhtml below
  2. Monitor for javascript errors
  3. Click button “click for javascript error”
  4. See error: “this.restoreOverlayAppend is not a function”

Expected behavior The datePicker destroy code should succeed without javascript errors.

Example XHTML

<h:form>
	<p:datePicker id="dp" />

	<p:commandButton id="ajaxButton"
	                 value="click for javascript error"
	                 process="dp"
	                 update="dp" />
</h:form>

Example Bean no bean required

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
mellowarecommented, Dec 10, 2020

I see it now thanks!

0reactions
mellowarecommented, Jun 7, 2022

Most likely not in 8.0 as the fix is already included in 10.0.0 and 11.0.0 and you have the MonkeyPatch you can use above for 8.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Datepicker in div not working after ajax call - Stack Overflow
When I click on the ajax call is executed, and a datepicker is displayed with the disabled days of that ID. The problem...
Read more >
Datepicker is not working after ajax call using... - JBoss.org
Hi All, I'm trying to integrate datepicker jQuery beautiful plugin to an existing JSF application. The application used seam 2.1.2, jsf 1.2, ...
Read more >
Why Date Time Picker's date is not displayed when returned ...
The javascript error can be found in the browser console as: ... Ajax calls return JSON data which does not support Date types,...
Read more >
Javascript error in R3 2021 SP1 caused by DatePicker with ...
Error message: Uncaught TypeError: Cannot read properties of undefined (reading '_events') at Sys.UI.DomEvent.addHandler (Telerik.Web.UI.
Read more >
jQuery and Ajax - Web2py
js " does the following: Defines an ajax function (based on jQuery $.ajax). Makes any DIV of class "error" or any tag object ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found