fix: datepicker not open when placeholder is chinese at ie 10 and 11 #865

pull/948/head
tanjinzhou 2019-07-04 18:17:15 +08:00
parent f9373e44ce
commit d4f23cec69
2 changed files with 11 additions and 0 deletions

View File

@ -3,6 +3,7 @@ import BaseMixin from '../../../_util/BaseMixin';
import { getComponentFromProp } from '../../../_util/props-util';
import moment from 'moment';
import { formatDate } from '../util';
import { isIE, isIE9 } from '../../../_util/env';
const DateInput = {
mixins: [BaseMixin],
@ -68,6 +69,10 @@ const DateInput = {
},
onInputChange(event) {
const str = event.target.value;
// https://github.com/vueComponent/ant-design-vue/issues/92
if (isIE && !isIE9 && this.str === str) {
return;
}
const { disabledDate, format, selectedValue } = this.$props;
// 退

View File

@ -2,6 +2,7 @@ import PropTypes from '../_util/vue-types';
import BaseMixin from '../_util/BaseMixin';
import moment from 'moment';
import { getComponentFromProp } from '../_util/props-util';
import { isIE, isIE9 } from '../_util/env';
const Header = {
mixins: [BaseMixin],
@ -64,6 +65,11 @@ const Header = {
methods: {
onInputChange(event) {
const str = event.target.value;
// https://github.com/vueComponent/ant-design-vue/issues/92
if (isIE && !isIE9 && this.str === str) {
return;
}
this.showStr = true;
this.setState({
str,