diff --git a/components/calendar/index.jsx b/components/calendar/index.jsx
index e793a4b56..fdeb43299 100644
--- a/components/calendar/index.jsx
+++ b/components/calendar/index.jsx
@@ -8,7 +8,6 @@ import LocaleReceiver from '../locale-provider/LocaleReceiver';
import interopDefault from '../_util/interopDefault';
import { ConfigConsumerProps } from '../config-provider';
import enUS from './locale/en_US';
-import Base from '../base';
import { checkValidate, stringToMoment, momentToString, TimeType } from '../_util/moment-util';
function noop() {
@@ -248,9 +247,8 @@ const Calendar = {
};
/* istanbul ignore next */
-Calendar.install = function(Vue) {
- Vue.use(Base);
- Vue.component(Calendar.name, Calendar);
+Calendar.install = function(app) {
+ app.component(Calendar.name, Calendar);
};
export { HeaderProps } from './Header';
export default Calendar;
diff --git a/components/vc-calendar/index.js b/components/vc-calendar/index.js
index d00e1f038..56945f6d2 100644
--- a/components/vc-calendar/index.js
+++ b/components/vc-calendar/index.js
@@ -1,8 +1,4 @@
// based on rc-calendar 9.15.10
-import Vue from 'vue';
-import ref from 'vue-ref';
import Calendar from './src/';
-Vue.use(ref, { name: 'ant-ref' });
-
export default Calendar;
diff --git a/components/vc-calendar/src/Calendar.jsx b/components/vc-calendar/src/Calendar.jsx
index f0208573d..83fb1c100 100644
--- a/components/vc-calendar/src/Calendar.jsx
+++ b/components/vc-calendar/src/Calendar.jsx
@@ -23,6 +23,7 @@ const getMomentObjectIfValid = date => {
const Calendar = {
name: 'Calendar',
+ inheritAttrs: false,
props: {
locale: PropTypes.object.def(enUs),
format: PropTypes.oneOfType([
@@ -273,22 +274,18 @@ const Calendar = {
if (timePicker && showTimePicker) {
const timePickerOriginProps = getOptionProps(timePicker);
const timePickerProps = {
- props: {
- showHour: true,
- showSecond: true,
- showMinute: true,
- ...timePickerOriginProps,
- ...disabledTimeConfig,
- value: sSelectedValue,
- disabledTime,
- },
- on: {
- change: this.onDateInputChange,
- },
+ showHour: true,
+ showSecond: true,
+ showMinute: true,
+ ...timePickerOriginProps,
+ ...disabledTimeConfig,
+ value: sSelectedValue,
+ disabledTime,
+ onChange: this.onDateInputChange,
};
if (timePickerOriginProps.defaultValue !== undefined) {
- timePickerProps.props.defaultOpenValue = timePickerOriginProps.defaultValue;
+ timePickerProps.defaultOpenValue = timePickerOriginProps.defaultValue;
}
timePickerEle = cloneElement(timePicker, timePickerProps);
}
diff --git a/components/vc-calendar/src/FullCalendar.jsx b/components/vc-calendar/src/FullCalendar.jsx
index 136f6d1a7..f8410607b 100644
--- a/components/vc-calendar/src/FullCalendar.jsx
+++ b/components/vc-calendar/src/FullCalendar.jsx
@@ -1,7 +1,7 @@
import moment from 'moment';
import PropTypes from '../../_util/vue-types';
import BaseMixin from '../../_util/BaseMixin';
-import { getOptionProps, hasProp, getListeners } from '../../_util/props-util';
+import { getOptionProps, hasProp } from '../../_util/props-util';
import DateTable from './date/DateTable';
import MonthTable from './month/MonthTable';
import CalendarMixin, { getNowByCurrentStateValue } from './mixin/CalendarMixin';
@@ -10,6 +10,7 @@ import CalendarHeader from './full-calendar/CalendarHeader';
import enUs from './locale/en_US';
const FullCalendar = {
name: 'FullCalendar',
+ inheritAttrs: false,
props: {
locale: PropTypes.object.def(enUs),
format: PropTypes.oneOfType([PropTypes.string, PropTypes.array, PropTypes.func]),
@@ -103,17 +104,13 @@ const FullCalendar = {
} else {
const TheHeader = headerComponent || CalendarHeader;
const headerProps = {
- props: {
- ...props,
- prefixCls: `${prefixCls}-full`,
- type,
- value,
- },
- on: {
- ...getListeners(this),
- typeChange: this.setType,
- valueChange: this.setValue,
- },
+ ...props,
+ ...this.$attrs,
+ prefixCls: `${prefixCls}-full`,
+ type,
+ value,
+ onTypeChange: this.setType,
+ onValueChange: this.setValue,
key: 'calendar-header',
};
header =