Releases: Snater/CLNDR2
Release list
2.1.0
2.0.0
While version 1 was more like a renovation and sanitazation of the CLNDR source code, version 2 of CLNDR2 eventually is a complete rewrite allowing new features to be added.
New key features of CLNDR2 2.0
- Instead of rendering days and month, the calendar now supports consistent day, week, month, year and decade views that can be activated and configured per options.
- It is now possible to switch between views, for example to switch between year, month and day view to ease navigation.
- Asynchronous callbacks now allow events rendered by the calendar to be updated asynchronously while navigating.
Breaking changes
All internals and interfaces of CLNDR2 have been reevaluated in order to improve consistency, ease understanding the concepts, and accomodate the extended modularity of CLNDR2. While in CLNDR2 version 1.x, "month" and "day" was a static concept—a "month" rendering multiple "days", the 2.x equivalent is "item"—a "page" renders multiple "items". This conceptual change also results in changing default CSS classes and names of parameters passed to the template(s).
Version 2.x being more of a rewrite, many concepts have been changed fundamentally. The following lists are supposed to give pointers to what has been changed. Please consult the Readme and documentation on details.
Options have been changed
adjacentDaysChangeMonthhas been renamed toadjacentItemsChangePage.clickEventshas been renamed toon.doneRenderinghas been moved toon.afterRender.dateParameterhas been now supposed to be an object instead of a string and may be used to configure both, the key to locate the single-day date parameter in the event objects provided to theeventsoption, as well as the multi-day date parameters. The default date parameters for multi-day events changed fromstartDateandendDatetostartandend.lengthOfTimeoption has been replaced withpagination. There is now apaginationoption that may be used to configure the size of pages and the navigation step.multiDayEventsoption has been removed. CLNDR2 now supports both single- and multi-day events by default. Just provide your events to theeventsoption and configuredateParameterif not using the default keys for locating the event dates.readyhas been moved toon.ready.showAdjacentMonthshas been renamed toshowAdjacent.startWithMonthhas been renamed tostartOn.weekOffsethas been renamed toweekStartsOn.
Data provided to the template has changed
dayshas been replaced by the genericitemsparameter.monthshas been replaced by the genericpagesparameter.yearandmonthhave been superseded by a genericdateparameter that may be used to extract that information from.eventsLastMonth,eventsNextMonth,eventsThisMonthandeventsThisIntervalhave been replaced byeventswhich contains the events for thecurrentPage, thepreviousPageand thenextPage.intervalStartandintervalEndhave been replaced byinterval.
Interaction events have been changed
- All interaction event callbacks are now aggregated in the
onoptions. today,nextYear,nextMonth,nextInterval,previousInterval,previousYear,onYearChange,previousMonth,onMonthChange,previousInterval,onIntervalChangehave all been replaced by thenavigatecallback that provides parameters to identify the nature of the navigation action.- The parameters of all callbacks have been revisited.
Full Changelog: v1.0.1...v2.0.0