API
Props
name | type | default | description | required version |
value | string array | calendar value, use v-modle for binding. String (including empty) means single seleciton; array (including empty array) means multiple selection. | -- | |
render-month | array | specify which date to render, for example [2018, 8] | -- | |
start-date | string | start date with format YYYY-MM-dd | -- | |
end-date | string | end date with format YYYY-MM-dd | -- | |
show-last-month | boolean | true | if show last month's days | -- |
show-next-month | boolean | true | if show next month's days | -- |
highlight-weekend | boolean | false | if highlight weekend days | -- |
return-six-rows | boolean | true | if always show six rows | -- |
hide-header | boolean | false | if hiding header | -- |
hide-week-list | boolean | false | if hiding week list | -- |
replace-text-list | object | replace list, for example, {'TODAY':'今'} | -- | |
weeks-list | array | ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'] | week list, starting from Sunday | -- |
render-function | function | render function to add extra contents, params (line, row, dateData) | -- | |
render-on-value-change | boolean | true | if re-render calendar if value changes, should set to false when showing multi months | -- |
disable-past | boolean | false | if disable the past days, can work with start-date | -- |
disable-future | boolean | false | if disable future days, can work with end-date | -- |
marks | array | (beta) style marks for specified date list | v2.6.0 | |
disable-weekend | boolean | false | whether disable weekends | v2.7.0 |
disable-date-function | function | check if a date should be disabled | v2.7.0 |
Events
name | params | description | required version |
@on-change | -- | emits when value is changed | -- |
@on-view-change | (data, index) | fires when render month is changed | v2.5.12 |
@on-select-single-date | (currentValue) | fires when date is selected in radio mode | 2.7.6 |
Slots
name | description | required version |
each-day | you can custom how to display each day | v2.3.5 |
Functions
name | params | description | required version |
getDates | get current date list | v2.5.11 | |
switchViewToToday | render current month | v2.5.12 | |
switchViewToMonth | (year, month) | render specified year and month | v2.5.12 |
switchViewToCurrentValue | render with current value's month | v2.5.12 |
Contributors
Contributors
Total commits quantity: 65,Total contributors quantity: 6
airylandQiongrong Jianglongyuan万刚greedyinglichunqiangChangelog
Releases
- v2.7.6 [feature] add event:on-select-single-date
- v2.7.3 [fix] disable-date-function result conflicts with disable-weekend #2189
- v2.7.2 [fix] fix reset-value issue in multiple mode #2160
- v2.7.2 [fix] fix props missing in calendar #2105
- v2.7.2 [fix] fix disabled weekends still selectable #2178
- v2.7.0 [enhance] call render function on created hook instead of mounted(ssr)
- v2.7.0 [feature] add prop:disable-weekend #2105
- v2.7.0 [feature] add prop:disable-date-function #2105
- v2.7.0 [fix] remove useless re-render function #2066
- v2.6.0 [feature] (beta) Support prop:marks to style specified date item
- v2.6.0 [fix] fix i18n for days
- v2.5.12 [feature] add method:switchViewToToday switchViewToMonth
- v2.5.12 [feature] support event:on-view-change
- v2.5.11 [feature] support method:getDates
- v2.5.11 [feature] support less variable @calendar-bg-color
- v2.5.9 [fix] donot set value to empty string when clicking on current selected item #1862
- v2.5.8 [fix] fix on-change event fires twice #1847
- v2.5.5 [feature] support multi select #1446 #1467
- v2.4.0 [enhance] re-render when render-month is changed
- v2.3.8 [enhance] prevent from clicking invisiable date #1564
- v2.3.6 [change] render-function params day => date #1361
- v2.3.5 [feature] Support slot:each-day
- v2.3.1 [fix] Fix render-function-generated-content visibility issue #1409
- v2.2.2 [enhance] when replace text of date is empty string, span of date will not show
- v2.2.1-rc.2 [enhance] Now next month's day can be clicked and will automatically switch to next month's view #1192
- v2.2.1-rc.2 [fix] fix start-date and end-date not reactive #1219
- v2.1.1-rc.10 [feature] Add more less variables. #896
- v2.1.1-rc.5 [fix] fix render-function not reactive