mirror of
https://github.com/directus/directus.git
synced 2026-01-30 10:48:00 -05:00
Emit value before unmounting datepicker (#11670)
This commit is contained in:
@@ -63,6 +63,9 @@ export default defineComponent({
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
if (flatpickr) {
|
||||
const selectedDate = flatpickr.selectedDates.length > 0 ? flatpickr.selectedDates[0] : null;
|
||||
emitValue(selectedDate);
|
||||
|
||||
flatpickr.destroy();
|
||||
flatpickr = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user