DatePicker: JavaScript error during ajax request
See original GitHub issueDescribe 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:
- Setup page with example xhtml below
- Monitor for javascript errors
- Click button “click for javascript error”
- 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:
- Created 3 years ago
- Comments:11 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I see it now thanks!
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