How to fix issue related to the calendar

When we click on the calendar first and select some date. After that when we click anywhere on the page the calendar will be opened. To fix, this issue we need to write CSS for the main div of the calendar field.Position: relative; By this, we can fix the issue.

Published
Categorized as Magento

Why can’t one switch back to the default mode on Magento 2?

To switch back to default mode, open:- app/etc/env.php And change:- ‘MAGE_MODE’ => ‘developer’, Back to:- ‘MAGE_MODE’ => ‘default’, And re-deploy static files again. reference:https://magento.stackexchange.com/questions/112523/why-cant-one-switch-back-to-the-default-mode-on-magento-2

Published
Categorized as Magento

Load price phtml file in magento2

we have to get product price HTML using Magento 2 below way, we have to create a block Vendor\Module\Block\Product. PHP and get your product object and call the below function in your template file. protected $resultLayout; public function __construct(\Magento\Framework\View\Result\Layout $resultLayout) {$this->resultLayout = $resultLayout;} public function getProductPriceHtml(\Magento\Catalog\Model\Product $product){/** @var \Magento\Framework\Pricing\Render $priceRender */$priceRender = $this->resultLayout->getLayout()->getBlock(\Magento\Framework\Pricing\Render::class);if (!$priceRender) {$priceRender… Continue reading Load price phtml file in magento2

Published
Categorized as Magento

Addeventlistener in javascript.

The addEventListener() is an inbuilt function in JavaScript that takes the event to listen for, and a second argument to be called whenever the described event gets fired. Any number of event handlers can be added to a single element without overwriting existing event handlers.

Published
Categorized as Magento