i-dont-see-the-calendar-on-elementor

Support forumCategory: Bugsi-dont-see-the-calendar-on-elementor
Davide Ranieri asked 4 years ago
Hi, I installed the plugin, I set everything up, I copied the code into elementor but I don\'t see the calendar.Thank you
4 Answers
Nikola Loncar Staff answered 4 years ago
Hi Davide, have you cleared the cache for that page? Best regards, Nikola
pradev answered 3 years ago
Hi Nikola, thanks for the great job you have done! I have the same issue when trying to place the shortcode into Elementor's editor. Using 'Shortcode' widget and after inserting the shortcode into it - nothing is generated on the preview, I see only the string [ea_bootstrap ...]. I do not use any cache plugins. Any suggestions?
pradev replied 3 years ago

*I see only the string for shortcode (it’s trimmed in the commend above).

pradev answered 3 years ago
As far as I can see in the Elementor preview mode your shortcode is not registered yet.
Dumping with shortcode_exists('ea_bootstrap') in the render method of any widget - it returns false. If I dump with any other shortcode slug, for example 'contact-form-7', it returns true. Probably you add the shortcode after elementor's initialization. Can you check on it?
pradev replied 3 years ago

Found it.
You init Frontend container only if is not admin:

// admin panel split loading for optimization
if (is_admin()) {
$admin = $this->container[‘admin_panel’];
$admin->init();
} else {
$frontend = $this->container[‘frontend’];
$frontend->init();
………….
}

Thats why it is missing in the elementor editors mode.
Can you think of fixing it?

Nikola Loncar Staff answered 3 years ago
Hi, thanks for reporting that one. You want that frontend part to be inited all the time? Best regards, Nikola
pradev replied 3 years ago

I’m not sure if the frontend part is inited all the time it will works fine with Elementor page editor.

At the moment I’m creating an Elementor widget which displays EA bootstrap form with some options available to the shortcode – location, worker, service, layout_cols, width, etc.

I made it works almost perfect – on widget level for Elementor edit mode i’m calling add_shortcode with your frontend controller’s method, but at the end when render the widget I need to call manually jQuery(“.ea-bootstrap”).eaBootstrap(); to init the form.

If you want you can play with the default Elementor shortcode widget and check if you need to do more changes. Of course only if you want your shortcode to be compatible within Elementor editor.