Commit 57c38ada121ae4b46fc0b5590f50eed4d854d2a6
Committed by
GitHub
Merge pull request #3066 from SergioCrisostomo/datepicker
Prevent clicking in week number label
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
src/components/date-picker/base/mixin.js
@@ -37,7 +37,7 @@ export default { | @@ -37,7 +37,7 @@ export default { | ||
37 | }, | 37 | }, |
38 | methods: { | 38 | methods: { |
39 | handleClick (cell) { | 39 | handleClick (cell) { |
40 | - if (cell.disabled) return; | 40 | + if (cell.disabled || cell.type === 'weekLabel') return; |
41 | const newDate = new Date(clearHours(cell.date)); | 41 | const newDate = new Date(clearHours(cell.date)); |
42 | 42 | ||
43 | this.$emit('on-pick', newDate); | 43 | this.$emit('on-pick', newDate); |
@@ -50,4 +50,4 @@ export default { | @@ -50,4 +50,4 @@ export default { | ||
50 | this.$emit('on-change-range', newDate); | 50 | this.$emit('on-change-range', newDate); |
51 | }, | 51 | }, |
52 | } | 52 | } |
53 | -}; | ||
54 | \ No newline at end of file | 53 | \ No newline at end of file |
54 | +}; |