📄 readme
字号:
Calendar Release Notes*** version 2.6.0 ***+ Fixed incorrect cell index parsing from cell id attribute, when Calendar id contained "cell". + Added text to previous month, next month and close icons, to enhance accessibility for screen-readers. + Fixed issue with bubbled previous month, next month click events missing target information in certain browsers (due to replaced HTML), by delaying click event handling through a setTimeout. + Added destroy method to Calendar/CalendarGroup+ Fixed incorrect clear method behavior for CalendarGroup where all pages would be set to the same month. + Refactored code to reduce minified Kweight.*** version 2.5.2 ***+ CalendarGroup toDate method no longer throws javascript exception*** version 2.5.1 *** + Fixed bug with mindate, maxdate being applied incorrectly if set to a day on which time change took place (DST, E.U Summertime) and the day is not the first day of the week.+ Fixed DateMath.getWeekNumber implementation to return correct week numbers. The older implementation would return Week 0 for certain weeks (e.g. the week starting Sun Dec 28th 2008) To suppor the fix, DateMath.getWeekNumber has a signature change in 2.5.1 and can now support U.S Week calculations based on Jan 1st identifying the first week of the year, as well as ISO8601 week calculations based on Jan 4th identifying the first week of the year The arguments which the method expected prior to 2.5.1 were not being used in calculating the week number. The new signature is: DateMath.getWeekNumber(Date dt, Number firstDayOfWeek, Number janDate) Where: dt is the date for which week number is required firstDayOfWeek is the day index identifying the first day of the week. Default is 0 (Sunday). janDate is the date in the first week of January, which identifies the first week of the year. Default is YAHOO.widget.DateMath.WEEK_ONE_JAN_DATE (1) NOTE: Calendar instances themselves do not currently expose a configuration property to change the week numbering system used. A "janDate" value is not passed to the getWeekNumber method, when used by Calendar, resulting in it using the default value. Therefore, ISO8601 week numbering can be generated for Calendars by setting the value of YAHOO.widget.DateMath.WEEK_ONE_JAN_DATE to 4.*** version 2.5.0 *** + Prevent default event handling in CalendarNavigator enter key listener, to prevent automatic form submission when using Calendar inside a form.+ Added workaround to DateMath.add and subtract for Safari 2 (webkit) bug in Date.setDate(n) which doesn't handle value of n less than -128 or greater than 127 correctly. See: http://brianary.blogspot.com/2006/03/safari-date-bug.html+ Added border, padding and margin rules to Calendar Sam Skin to protect Sam Skin's look and feel when Calendar is used with YUI base.css*** version 2.4.0 *** + Added CalendarNavigator (year selector) feature to allow the user to jump to a year/month directly without having to scroll through months sequentially. The feature is enabled/configured using the "navigator" configuration property.+ Added Custom Events: showNav/beforeShowNav hideNav/beforeHideNav, renderNav/beforeRenderNav To Calendar/CalendarGroup, in support of the CalendarNavigator functionality. + Added Custom Events: show/beforeShow hide/beforeHide To Calendar and CalendarGroup. Returning false from a beforeShow/beforeHide listener can be used to prevent the Calendar from being shown/hidden respectively. + Added Public Methods: getCellIndex(date) [ Calendar ] getCalendarPage(date) [ CalendarGroup ] toDate(dateArray) [ Calendar/CalendarGroup ] removeRenderers() [ Calendar/CalendarGroup ] + The Calendar/CalendarGroup constructor is now more flexible: * It no longer requires an "id" argument. In it's simplest form, a Calendar/CalendarGroup can be constructed by simply providing a container id or reference. var cal = new YAHOO.widget.Calendar("container"); -or- var containerDiv = YAHOO.util.Dom.get("container"); var cal = new YAHOO.widget.Calendar(containerDiv); An id for the Calendar does not need to be provided, and will be generated from the container id by appending an "_t" suffix to the container id if only the container is provided. * The container argument can be either a string, representing the id of the container, or an HTMLElement referring to the container element itself, as suggested in the example above. * If an HTMLElement is provided for the container argument and the element does not have an id, one will be generated for it using YAHOO.util.Dom.generateId(). * The older form of Calendar/CalendarGroup signature, expecting both an id and containerId is still supported and works as it did prior to 2.4.0. + Fixed performance issue, where the same custom renderer was being applied multiple times to the same cell.+ Added getDate(year, month, date) factory method to the DateMath utility, which can be used to create JavaScript Date instances for years less than 100. The default Date(year, month, date) constructor implementations across browsers, assume that if year < 100, the caller is referring to the nineteen hundreds, and the year is set to 19xx instead of xx (as with the deprecated setYear method). However Date.setFullYear(xx) can be used to set dates below 100. The above factory method provides a construction mechanism consistent with setFullYear.+ Changed Calendar/CalendarGroup/DateMath code to use the DateMath.getDate method, so that 2 digit years are not assumed to be in the 1900's. NOTE: Calendar's API already expects 4 digit date strings when referring to years after 999.*** version 2.3.1 *** + Changed Calendar/CalendarGroup to render an empty title bar element when "close" is set to true, but "title" has not been set, to allow Sam Skin to render a title bar correctly. *** version 2.3.0 *** + Added checks to select, selectCell, deselect and deselectCell methods to ensure the Calendar/Calendar group was not set to an invalid state by programmatically selecting unselectable dates or cells. + Added new locale configuration properties for the Month/Year label used in the Calendar header (MY_LABEL_MONTH_POSITION, MY_LABEL_YEAR_POSITION, MY_LABEL_YEAR_SUFFIX, MY_LABEL_MONTH_SUFFIX). Japan is an example locale, where customization of the Month/Year label is required. + Changed "first", "last" class names to "first-of-type", "last-of-type", to avoid collision with YUI Grids' use of the "first" class name. + Added public isDateOOB method, to check if a given date is outside of the minimum/maximum configuration dates of the Calendar. + Deprecated YAHOO.widget.Calendar.browser, refactored to use YAHOO.env.ua instead. + Removed overflow:hidden from default Calendar/CalendarGroup container for non-IE6 browsers to fix clipping issue with IE7 when CalendarGroup was inside a box with a specific width. overflow:hidden is still required for IE6 with an iframe shim.+ Added Opera container width calculation fix to CalendarGroup.show method, to fix incorrect wrapping when using a CalendarGroup which is initially rendered hidden (display:none). Previously this fix was only applied on render. *** version 2.2.2 *** + Fixed problem with selected dates being shared across instances, when more than one Calendar/CalendarGroup was on the page *** version 2.2.1 *** + Fixed problem with selectCell adding duplicate selected date entries for dates which were already selected
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -