File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -386,26 +386,27 @@ export default {
386386
387387 this .close ()
388388 this .showDayView = true
389- if (! this .isInline ) {
390- document .addEventListener (' click' , this .clickOutside , false )
391- }
389+ this .addOutsideClickListener ()
392390 },
393391 showMonthCalendar () {
394392 if (! this .allowedToShowView (' month' )) return false
395393
396394 this .close ()
397395 this .showMonthView = true
398- if (! this .isInline ) {
399- document .addEventListener (' click' , this .clickOutside , false )
400- }
396+ this .addOutsideClickListener ()
401397 },
402398 showYearCalendar () {
403399 if (! this .allowedToShowView (' year' )) return false
404400
405401 this .close ()
406402 this .showYearView = true
403+ this .addOutsideClickListener ()
404+ },
405+ addOutsideClickListener () {
407406 if (! this .isInline ) {
408- document .addEventListener (' click' , this .clickOutside , false )
407+ setTimeout (() => {
408+ document .addEventListener (' click' , this .clickOutside , false )
409+ }, 100 )
409410 }
410411 },
411412 setDate (timestamp ) {
You can’t perform that action at this time.
0 commit comments