Releases: nathanreyes/v-calendar
Releases · nathanreyes/v-calendar
v0.9.0
Bug Fixes
v-calendar
- Fixes Turkish locale identifier
- Fixes weekday formatting by using UNC dates with
Intl.DateTimeFormat
. Closes #104. - Other small bug fixes
v-date-picker
- Fixes glitch with highlight cap animation when
mode === "range"
- Fixes bug with
themeStyles.dayContent
style getting ignored. Closes #115.
Improvements
v-calendar
- Adds
min-date
prop as a convenient alternative tomin-page
- Adds
max-date
prop as a convenient alternative tomax-page
- Adds
is-linked
prop to link panes to consecutive months whenis-double-paned
is set. Closes #80. - Adds
is-vertical
prop for vertical calendar orientation whenis-double-paned
is set. Closes #89.
v-date-picker
min-date
andmax-date
props are now forwarded tov-calendar
. Closes #78.
Defaults
Theme styles modifications. Closes #93.
Style | Modification | Description |
---|---|---|
horizontalDivider |
Add | Horizontal divider when calendars are in vertical orientation (is-vertical ) |
navHeader |
Add | Navigation pane header. |
navHeaderTitle |
Add | Navigation pane header title. |
navHeaderArrows |
Add | Navigation pane header arrows. |
navMonthCell |
Add | Navigation pane month cells. |
navYearCell |
Add | Navigation pane year cells. |
header |
Edited | Supports use of function that accepts a page object and return a style |
headerTitle |
Edit | Supports use of function that accepts a page object and return a style |
headerArrows |
Edit | Supports use of function that accepts a page object and return a style |
headerHorizontalDivider |
Edit | Supports use of function that accepts a page object and return a style |
weekdays |
Edit | Supports use of function that accepts a page object and return a style |
weekdaysHorizontalDivider |
Edit | Supports use of function that accepts a page object and return a style |
weeks |
Edit | Supports use of function that accepts a page object and return a style |
headerVerticalDivider |
Remove | Reference note below |
weekdaysVerticalDivider |
Remove | Reference note below |
weeksVerticalDivider |
Remove | Reference note below |
- Styles removed in favor of defining functions for the
header
,weekdays
andweeks
styles like so...
<template>
<v-calendar :theme-styles='themeStyles'>
</v-calendar>
</template>
export default {
data() {
return {
themeStyles: {
// Use page position to set left border for the 2nd pane header
// NOTE: You can use the `verticalDivider` style to apply a single border. Just use this technique to apply different border styles for specific sections (header, weekdays, weeks)
header({ position }) {
return (position === 2) && {
borderLeft: '1px solid #dadada'
};
}
}
}
}
}
v0.8.0
Bug Fixes
v-date-picker
- Fixes
select-attribute
anddrag-attribute
props getting written over. Closes #75.
Improvements
v-calendar
- Attribute types (highlight, bar, dot, contentStyle, popover) can now be defined as functions that accept an object parameter with the following properties and return an object. Closes #81.
Property Name | Type | Description |
---|---|---|
day |
Object | Object with specific information about the day displaying the attribute. |
targetDate |
Object | Date info object. |
isHovered |
Boolean | Day element is currently hovered over. |
isFocused |
Boolean | Day element is currently focused. Only applies when a popover is configured. |
onStart |
Boolean | Day lies on the first day of the attribute's targetDate . |
onEnd |
Boolean | Day lies on the last day of the attributes's targetDate . |
- The
attribute.contentHoverStyle
property has been deprecated in favor of using a function forattribute.contentStyle
. - The
dayContentHover
theme style has been deprecated in favor of using a function to define thecontentStyle
. - Support use of a
formats.data
parser to parse attribute dates
v-date-picker
- Add
popoverShowClearMargin
prop to apply clear margin when popover appears. Closes #47. - Add events for
popover-will-appear
,popover-did-appear
,popover-will-disappear
andpopover-did-disappear
show-popover
prop renamed toshow-day-popover
to avoid confusion with input popoverpopoverContentOffset
prop converted to number instead of a string
defaults
formats.data
supported for parsing attribute datesdate-picker-show-popover
renamed todate-picker-show-day-popover
popover-content-offset
is converted to number instead of a string
v0.7.4
Bug Fixes
- Redress issue introduced by v0.7.3."
v0.7.3
v0.7.2
v0.7.1
Bug Fixes
- Fix setup crash when not manually specifying a locale
v0.7.0
Bug Fixes
v-calendar
- Fix animation bug when
weeks-transition
ortitle-transition
is"none"
. Closes #70.
v-date-picker
- Disabling dates on drag can invalidate current selected range. Closes #67.
Improvements
v-calendar
- Uses Javascript's
Intl.DateTimeFormat
API to supply month and day names for to 35 languages with minimal bundle size. - Transitioned top level calendar component to render function for improved slot support.
- Supports a new
formats
prop object where you can specify custom formats for title, weekdays and navigation months. - Deprecate
month-labels
andweekday-labels
props in favor of usingformats
prop. - Improved handling of svg icons for smaller bundle size.
v-date-picker
- Transitioned all date picker components to render functions. This allows using all slots that
v-calendar
supports. Closes #49. - Supports a new
formats
prop object where you can specify custom formats for input element and date selection popovers. - Deprecate
dateFormatter
anddateParser
props in favor of usingformats
prop.
v0.6.3
v0.6.1
v0.6.0
Bug Fixes
v-date-picker
- Bug:
fromPage
andtoPage
not updating when new date was assigned or selected.
Fix:fromPage
andtoPage
are updated when new value is assigned, if needed. Closes #51. - Bug: When clearing out input element, infinite start and end dates selected.
Fix: When clearing out input element, date is cleared or reverts to previous value, depending onis-required
prop or if dragging in"range"
mode. Closes #54.
Improvements
- Add Finnish translation to locales
v-calendar
Props
- Rename
popover-header
slot name today-popover-header
to more clearly identify slot target
Slots
- Add
day-popover-footer
slot for day popover footers day-popover-header
,day-popover-footer
and custom popover slots acceptday
prop instead ofday-info
prop
Events
-
Rename
dayselect
calendar event todayclick
to more clearly indicate DOM event source -
Modify parameter structure for day events (
dayclick
,daymouseenter
,daymouseover
,daymouseleave
). Instead of passing multiple parameters in order (and having to remember the right order), there is now a single object parameter with the following properties.Property Type Description day
Number Day number (1 - 31). dayFromEnd
Number Day number from the end of the month (1 - 31). weekday
Number Day weekday number (1:Sun - 7:Sat). weekdayOrdinal
Number Weekday ordinal position from the start of the month (1 - 6). weekdayOrdinalFromEnd
Number Weekday ordinal position from the end of the month (1 - 6). week
Number Week number form the start of the month (1 - 6). weekFromEnd
Number Week number from the end of the month (1 - 6). month
Number Month number (1 - 12). year
Number Year number. date
Date Date for this day. dateTime
Number Result of calling date.getTime()
for this day.inMonth
Boolean Day lies in the currently active month. inPrevMonth
Boolean Day lies in the month before the currently active month. inNextMonth
Boolean Day lies in the month after the currently active month. attributes
Array List of attributes for the day involved with the event. attributesMap
Object Object map of the attributes using their designated key. event
Object Original trigger event.
v-date-picker
Props
- Add
is-required
prop tov-date-picker
to prevent null date selections. Closes #45. - Replace input related props (
input...
) withinput-props
object as a catch all for all props to apply to input element. - Replace
select-color
anddrag-color
props withtint-color
. Opacity is set to0.5
whentint-color
is applied todrag-attribute
. - Add
disabled-attribute
prop.
Defaults
- Replace input related defaults (
datePickerInput...
) withinput-props
as a configurable default function or object.