Question

I am trying to cut some code to speed up the site and found aclendar.phtml + js and just wondering, what do they do?

My site's home page does not have any of calendar code but if you were to open inner pages, like https://www.airyhair.com/tape-in-hair-extensions.html

it has this:

'DHTML Date/Time Selector\n' +
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" +
'For latest version visit: http://www.dynarch.com/projects/calendar/\n' +
'Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details.' +
'\n\n' +
'Date selection:\n' +
'- Use the \xab, \xbb buttons to select year\n' +
'- Use the \u2039 buttons to select month\n' +
'- Hold mouse button on any of the above buttons for faster selection.';
Calendar._TT["ABOUT_TIME"] = '\n\n' +
'Time selection:\n' +
'- Click on any of the time parts to increase it\n' +
'- or Shift-click to decrease it\n' +
'- or click and drag for faster selection.';

Calendar._TT["PREV_YEAR"] = 'Prev. year (hold for menu)';
Calendar._TT["PREV_MONTH"] = 'Prev. month (hold for menu)';
Calendar._TT["GO_TODAY"] = 'Go Today';
Calendar._TT["NEXT_MONTH"] = 'Next month (hold for menu)';
Calendar._TT["NEXT_YEAR"] = 'Next year (hold for menu)';
Calendar._TT["SEL_DATE"] = 'Select date';
Calendar._TT["DRAG_TO_MOVE"] = 'Drag to move';
Calendar._TT["PART_TODAY"] = ' (' + "today" + ')';

// the following is to inform that "%s" is to be the first day of week
Calendar._TT["DAY_FIRST"] = 'Display %s first';

// This may be locale-dependent. It specifies the week-end days, as an array
// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
// means Monday, etc.
Calendar._TT["WEEKEND"] = "0,6";

Calendar._TT["CLOSE"] = 'Close';
Calendar._TT["TODAY"] = "today";
Calendar._TT["TIME_PART"] = '(Shift-)Click or drag to change value';

// date formats
Calendar._TT["DEF_DATE_FORMAT"] = "%b %e, %Y";
Calendar._TT["TT_DATE_FORMAT"] = "%B %e, %Y";

Calendar._TT["WK"] = "Week";
Calendar._TT["TIME"] = 'Time:';
//]]>

Is this needed for retail products? I never once seen a calendar on my site

Was it helpful?

Solution

Calendar.js is use for date input for custom product options (during product creating in Admin add/edit product)

enter image description here

To remove the css from you header on your product detail page (Assuming that you don't have any custom product attribute that is of date input type).

Take a look at catalog_product_view /app/design/frontend/base/default/layout/catalog.xml

In your local.xml

<catalog_product_view>
   <reference name="head">
      <action method="removeItem"><type>skin_css</type><name>calendar/calendar-win2k-1.css</name></action>
      .....

See Magento remove css or js from specific view

To remove code from page

<catalog_product_view>
    <reference name="product_options_wrapper">
        <action method="unsetChild"><name>html_calendar</name></action>
    </reference>
</catalog_product_view>

See Magento - remove block using update XML

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