mirror of
https://github.com/tenrok/vue2-datepicker.git
synced 2026-06-11 03:32:26 +03:00
fix: click event compatible with xhtml
This commit is contained in:
@@ -152,7 +152,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');
|
||||
|
||||
@@ -89,7 +89,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');
|
||||
|
||||
@@ -92,7 +92,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