mirror of
https://github.com/tenrok/vue2-datepicker.git
synced 2026-06-10 16:22:28 +03:00
fix: click event compatible with xhtml (#550)
This commit is contained in:
@@ -151,7 +151,7 @@ export default {
|
||||
},
|
||||
handleCellClick(evt) {
|
||||
let { target } = evt;
|
||||
if (target.tagName === 'DIV') {
|
||||
if (target.tagName.toUpperCase() === 'DIV') {
|
||||
target = target.parentNode;
|
||||
}
|
||||
const date = target.getAttribute('data-date');
|
||||
|
||||
@@ -88,7 +88,7 @@ export default {
|
||||
},
|
||||
handleClick(evt) {
|
||||
let { target } = evt;
|
||||
if (target.tagName === 'DIV') {
|
||||
if (target.tagName.toUpperCase() === 'DIV') {
|
||||
target = target.parentNode;
|
||||
}
|
||||
const month = target.getAttribute('data-month');
|
||||
|
||||
@@ -91,7 +91,7 @@ export default {
|
||||
},
|
||||
handleClick(evt) {
|
||||
let { target } = evt;
|
||||
if (target.tagName === 'DIV') {
|
||||
if (target.tagName.toUpperCase() === 'DIV') {
|
||||
target = target.parentNode;
|
||||
}
|
||||
const year = target.getAttribute('data-year');
|
||||
|
||||
Reference in New Issue
Block a user