mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
fix(datepicker): improve focus handling and scroll position restoration in modal
This commit is contained in:
1 parent
056b27b016
commit
61fc55d313
3 files changed
+77
-22
No files matched your search
@@ -4,14 +4,13 @@
|
||||
<button @click="$emit('removeTimeblock')" class="x-button">x</button>
|
||||
</div>
|
||||
<div
|
||||
@click="openDatepicker('datepicker')"
|
||||
@click="handleDatepickerClick"
|
||||
class="datepicker-wrapper"
|
||||
ref="datepicker-wrapper"
|
||||
>
|
||||
<Datepicker
|
||||
:model-value="timeblock.date"
|
||||
ref="datepicker"
|
||||
@open="onDateOpen"
|
||||
@update:model-value="updateDate"
|
||||
format="dd.MM.yyyy"
|
||||
locale="sk"
|
||||
@@ -104,6 +103,14 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
handleDatepickerClick() {
|
||||
// Pass the datepicker wrapper element reference to the mixin
|
||||
const scrollTarget = this.$refs['datepicker-wrapper'];
|
||||
this.onDateOpen(scrollTarget);
|
||||
// Open the datepicker
|
||||
this.openDatepicker('datepicker');
|
||||
},
|
||||
|
||||
async openDatepicker(ref) {
|
||||
this.$refs[ref].openMenu();
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user