I am putting the Amelia Events Calendar type shortcode in a Bootstrap 5 Modal. However, when the Amelia shortcode first loads when the modal opens, it does not show the calendar view correctly. Only upon resizing the browser window with the BS modal open does the Amelia shortcode then show the calendar correctly.
Is there a JS event for when the shortcode has finished loading where I can trigger a screen resize or another suitable option or fix?
I could replicate the issue and I forwarded it to our developers, so they can take a look.
Since this is a popup of some sort, I need to tell you that, at the moment, we only support Elementor's Popup and that we can't guarantee that our forms will work correctly with other popups.
If you're using Elementor's popup we will, of course, do our best to see what's behind the issue.
I'll get back to you when I hear from our developers.
This JS code should solve the issue when added to the page:
var elements = document.getElementsByClassName('btn-accent');
function addTrigger(element) {
element.addEventListener("click", function(e) {
setTimeout(() => {
window.dispatchEvent(new Event('resize'));
}, 1000)
}, false);
}
for (let i=0; i < elements.length; i++) {
addTrigger(elements[i])
}
var elements = document.getElementsByClassName('btn-outline-accent');
function addTrigger(element) {
element.addEventListener("click", function(e) {
setTimeout(() => {
window.dispatchEvent(new Event('resize'));
}, 1000)
}, false);
}
for (let i=0; i < elements.length; i++) {
addTrigger(elements[i])
}
Since you have two buttons, it's best to assign a unique class in HTML and then you'll be sure that this script is activated only when these buttons are clicked with the classes "btn-accent" or "btn-outline-accent".
If you're adding a single class, like "single-class-aaa", you can use the script below:
var elements = document.getElementsByClassName('single-class-aaa');
function addTrigger(element) {
element.addEventListener("click", function(e) {
setTimeout(() => {
window.dispatchEvent(new Event('resize'));
}, 1000)
}, false);
}
for (let i=0; i < elements.length; i++) {
addTrigger(elements[i])
}
I am putting the Amelia Events Calendar type shortcode in a Bootstrap 5 Modal. However, when the Amelia shortcode first loads when the modal opens, it does not show the calendar view correctly. Only upon resizing the browser window with the BS modal open does the Amelia shortcode then show the calendar correctly.
Is there a JS event for when the shortcode has finished loading where I can trigger a screen resize or another suitable option or fix?
[ameliaevents type=calendar]
Attached files: before screen resize.jpg
after screen resize.jpg
Hello Tom.
Can you please provide me with the front-end page where our developers can take a look at this?
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi Aleksandar,
My fault, this change was discarded during a git push. I have put the calendar display type back.
Thanks, Tom.
I could replicate the issue and I forwarded it to our developers, so they can take a look.
Since this is a popup of some sort, I need to tell you that, at the moment, we only support Elementor's Popup and that we can't guarantee that our forms will work correctly with other popups.
If you're using Elementor's popup we will, of course, do our best to see what's behind the issue.
I'll get back to you when I hear from our developers.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hey Tom.
This JS code should solve the issue when added to the page:
Since you have two buttons, it's best to assign a unique class in HTML and then you'll be sure that this script is activated only when these buttons are clicked with the classes "btn-accent" or "btn-outline-accent".
If you're adding a single class, like "single-class-aaa", you can use the script below:
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables