2
0
mirror of https://github.com/tenrok/vue2-datepicker.git synced 2026-06-23 16:10:35 +03:00

fix: click event compatible with xhtml (#550)

This commit is contained in:
mengxiong10
2020-11-26 09:46:07 +08:00
parent 57f22191ad
commit b7cbc0d2f1
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -151,7 +151,7 @@ export default {
}, },
handleCellClick(evt) { handleCellClick(evt) {
let { target } = evt; let { target } = evt;
if (target.tagName === 'DIV') { if (target.tagName.toUpperCase() === 'DIV') {
target = target.parentNode; target = target.parentNode;
} }
const date = target.getAttribute('data-date'); const date = target.getAttribute('data-date');
+1 -1
View File
@@ -88,7 +88,7 @@ export default {
}, },
handleClick(evt) { handleClick(evt) {
let { target } = evt; let { target } = evt;
if (target.tagName === 'DIV') { if (target.tagName.toUpperCase() === 'DIV') {
target = target.parentNode; target = target.parentNode;
} }
const month = target.getAttribute('data-month'); const month = target.getAttribute('data-month');
+1 -1
View File
@@ -91,7 +91,7 @@ export default {
}, },
handleClick(evt) { handleClick(evt) {
let { target } = evt; let { target } = evt;
if (target.tagName === 'DIV') { if (target.tagName.toUpperCase() === 'DIV') {
target = target.parentNode; target = target.parentNode;
} }
const year = target.getAttribute('data-year'); const year = target.getAttribute('data-year');