데이터피커추가
This commit is contained in:
parent
437592ed0d
commit
fc6c828624
@ -41,6 +41,7 @@
|
||||
class="flatpickr-calendar-only"
|
||||
>
|
||||
</full-calendar>
|
||||
<input ref="calendarDatepicker" type="text" class="d-none" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -67,6 +68,7 @@
|
||||
import { useProjectStore } from '@/stores/useProjectStore';
|
||||
import { useToastStore } from '@s/toastStore';
|
||||
import { useWeatherStore } from '@/stores/useWeatherStore';
|
||||
import { useDatePicker } from '@/stores/useDatePicker';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import router from '@/router';
|
||||
import FullCalendar from '@fullcalendar/vue3';
|
||||
@ -85,14 +87,17 @@
|
||||
const userStore = useUserInfoStore();
|
||||
const projectStore = useProjectStore();
|
||||
const weatherStore = useWeatherStore();
|
||||
const datePickerStore = useDatePicker();
|
||||
const { dailyWeatherList } = storeToRefs(weatherStore);
|
||||
|
||||
const dayjs = inject('dayjs');
|
||||
const fullCalendarRef = ref(null);
|
||||
const workTimeComponentRef = ref(null);
|
||||
const calendarEvents = ref([]);
|
||||
const calendarDatepicker = ref(null);
|
||||
//const dailyWeatherList = ref([]);
|
||||
|
||||
|
||||
const selectedProject = ref(null);
|
||||
const checkedInProject = ref(null);
|
||||
|
||||
@ -630,6 +635,14 @@
|
||||
// 스크롤 감지 이벤트 리스너
|
||||
window.addEventListener('wheel', handleWheelEvent);
|
||||
window.addEventListener('click', colorToday);
|
||||
|
||||
datePickerStore.initDatePicker(
|
||||
fullCalendarRef,
|
||||
async (year, month, options) => {
|
||||
// 데이터 다시 불러오기
|
||||
await fetchData();
|
||||
}
|
||||
);
|
||||
});
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user