Releases: Snater/CLNDR2
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
adjacentDaysChangeMonth
has been renamed toadjacentItemsChangePage
.clickEvents
has been renamed toon
.doneRendering
has been moved toon.afterRender
.dateParameter
has 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 theevents
option, as well as the multi-day date parameters. The default date parameters for multi-day events changed fromstartDate
andendDate
tostart
andend
.lengthOfTime
option has been replaced withpagination
. There is now apagination
option that may be used to configure the size of pages and the navigation step.multiDayEvents
option has been removed. CLNDR2 now supports both single- and multi-day events by default. Just provide your events to theevents
option and configuredateParameter
if not using the default keys for locating the event dates.ready
has been moved toon.ready
.showAdjacentMonths
has been renamed toshowAdjacent
.startWithMonth
has been renamed tostartOn
.weekOffset
has been renamed toweekStartsOn
.
Data provided to the template has changed
days
has been replaced by the genericitems
parameter.months
has been replaced by the genericpages
parameter.year
andmonth
have been superseded by a genericdate
parameter that may be used to extract that information from.eventsLastMonth
,eventsNextMonth
,eventsThisMonth
andeventsThisInterval
have been replaced byevents
which contains the events for thecurrentPage
, thepreviousPage
and thenextPage
.intervalStart
andintervalEnd
have been replaced byinterval
.
Interaction events have been changed
- All interaction event callbacks are now aggregated in the
on
options. today
,nextYear
,nextMonth
,nextInterval
,previousInterval
,previousYear
,onYearChange
,previousMonth
,onMonthChange
,previousInterval
,onIntervalChange
have all been replaced by thenavigate
callback 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