1

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

  • you are talking about admin side or frontend side ? – Rajeev K Tomy Feb 3 '17 at 3:48
1

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.

  • Yes I know :-) Happy to help you out. – Rajeev K Tomy Feb 3 '17 at 9:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.