v2.4.0
This is the release notes for QCalendar v2.4.0. Read the entirety of these notes, especially on changes to the event system.
General
updated: month view - month-label-size
property default has been adjusted from md
to sm
fixed: Month mini-mode: Workweek numbers don't line up with dates (#172)
updated: css class .q-event
has been deprecated, Use .q-day-event
instead
fixed: In certain cases, value ('input'/v-model) is emitted twice (#173)
fixed: Resource view sometimes exceeds parent width (#180)
feat: New scoped slot for month
view: workweek-header
. When show-work-weeks
property is true, this slot is available. The scope is the following:
scope: {
start: {
// timestamp - first day of the month
}
end: {
// timestamp - last day of the month
}
}
feat: New event for month
view: [event]:workweek:header2
{
scope: {
start: {
// timestamp - first day of the month
}
end: {
// timestamp - last day of the month
}
},
event: {
// The event
}
}
feat: New event for month
view: [event]:day:header2
{
scope: {
timestamp: {
// timestamp for the weekday of the first week
},
days: [
// an array of timestamps for that weekday
],
index, // optional
miniMode // true if in monthly mini-mode
},
event: {
// The event
}
}
New event added for day, day2, day3, day4, day5 and day6 views: [event]:interval:header2
.
Applied when clicking the header section above the intervals section.
{
scope: {
days: [
// an array of timestamps applicable for the view
]
},
event: {
// The event
}
}
feat: New event for resource
view: resource:header2
Applied when clicking the header section above the resources section.
{
scope: {
days: [
// an array of timestamps for the visible days
]
},
event: {
// the event
}
}
Events
The event system has changed yet again. However, instead of breaking everyone's implementation (which no one cares for), the new eventing system has been renamed and previous events, while still existing, have been deprecated and will remain until the next major release. This gives you opportunity to opt-in to the eventing system changes at your convenience.
For instance, if you were using the event click:date
the replacement event will be click:date2
.
Why this change? There was many inconsistencies in the data passed from the events. It was different for each event. This change attempts to consolidate and to make the events intuitive.
As an example, the new default event will mostly look like this:
{
scope: {
timestamp: {
// the associated timestamp object
},
index: 0, // optional, usually used for day view with `column-count` or resource view
timeStartPos: Function // optional
timeDurationHeight: Function // optional
timeStartPosX: Function // optional
timeDurationHeightX: Function // optional
resource: {
// optional, used for resource view
}
},
event: {
// The event
}
}
And, for most events, this was the case. For all intents and purposes, the scope
part of the data is what gets passed to scoped slots of the same area.
For all views, except the monthly view, the :day
event has been changed to :day:header
to communicate it's capabilities better.