Question

I am try to get rid of calendar.css file, because I don't use dates anywhere. When I set merge css files from admin, calendar file still loaded separately.

I am just wondering, How can get rid of it completely?

Yes, I could just delete the code but browser still makes 1 extra request to load the blank file.

Magento: 1.9

/js/calendar/calendar-win2k-1.css

Was it helpful?

Solution

In order to properly erase calendar.css, you need to create a module. Inside your layout update xml file, you need to add this:

File : app/design/{frontend|adminhtml}/base/default/layout/{layout_update_xml_file}.xml

<layout>
    <default>
        <reference name="head">
            <action method="removeItem"><type>js_css</type><name>calendar/calendar-win2k-1.css</name></action>
            <action method="removeItem"><type>js</type><name>calendar/calendar.js</name></action>
        </reference>
    </default>
</layout>

Here I am not sure from which area you want to erase those calendar related js/css files. So use either frontend or adminhtml according to your need.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top