Skip to content

Commit

Permalink
picker: fix time and bug for value validate
Browse files Browse the repository at this point in the history
  • Loading branch information
youngerheart authored and Leopoldthecoder committed Feb 14, 2017
1 parent a9fcc97 commit 99e8d11
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/date-picker/src/picker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
@keydown.native="handleKeydown"
:value="displayValue"
@change.native="displayValue = $event.target.value"
:validateEvent="false"
ref="reference">
<i slot="icon"
class="el-input__icon"
Expand Down Expand Up @@ -222,6 +223,7 @@ export default {
watch: {
pickerVisible(val) {
if (!val) this.dispatch('ElFormItem', 'el.form.blur');
if (this.readonly || this.disabled) return;
val ? this.showPicker() : this.hidePicker();
},
Expand All @@ -241,6 +243,7 @@ export default {
},
displayValue(val) {
this.$emit('change', val);
this.dispatch('ElFormItem', 'el.form.change');
}
},
Expand Down Expand Up @@ -383,7 +386,6 @@ export default {
handleBlur() {
this.$emit('blur', this);
this.dispatch('ElFormItem', 'el.form.blur');
},
handleKeydown(event) {
Expand Down

0 comments on commit 99e8d11

Please sign in to comment.