데이터피커추가

This commit is contained in:
yoon 2025-04-08 19:23:58 +09:00
parent 437592ed0d
commit fc6c828624

View File

@ -41,6 +41,7 @@
class="flatpickr-calendar-only" class="flatpickr-calendar-only"
> >
</full-calendar> </full-calendar>
<input ref="calendarDatepicker" type="text" class="d-none" />
</div> </div>
</div> </div>
</div> </div>
@ -67,6 +68,7 @@
import { useProjectStore } from '@/stores/useProjectStore'; import { useProjectStore } from '@/stores/useProjectStore';
import { useToastStore } from '@s/toastStore'; import { useToastStore } from '@s/toastStore';
import { useWeatherStore } from '@/stores/useWeatherStore'; import { useWeatherStore } from '@/stores/useWeatherStore';
import { useDatePicker } from '@/stores/useDatePicker';
import { storeToRefs } from 'pinia'; import { storeToRefs } from 'pinia';
import router from '@/router'; import router from '@/router';
import FullCalendar from '@fullcalendar/vue3'; import FullCalendar from '@fullcalendar/vue3';
@ -85,14 +87,17 @@
const userStore = useUserInfoStore(); const userStore = useUserInfoStore();
const projectStore = useProjectStore(); const projectStore = useProjectStore();
const weatherStore = useWeatherStore(); const weatherStore = useWeatherStore();
const datePickerStore = useDatePicker();
const { dailyWeatherList } = storeToRefs(weatherStore); const { dailyWeatherList } = storeToRefs(weatherStore);
const dayjs = inject('dayjs'); const dayjs = inject('dayjs');
const fullCalendarRef = ref(null); const fullCalendarRef = ref(null);
const workTimeComponentRef = ref(null); const workTimeComponentRef = ref(null);
const calendarEvents = ref([]); const calendarEvents = ref([]);
const calendarDatepicker = ref(null);
//const dailyWeatherList = ref([]); //const dailyWeatherList = ref([]);
const selectedProject = ref(null); const selectedProject = ref(null);
const checkedInProject = ref(null); const checkedInProject = ref(null);
@ -630,6 +635,14 @@
// //
window.addEventListener('wheel', handleWheelEvent); window.addEventListener('wheel', handleWheelEvent);
window.addEventListener('click', colorToday); window.addEventListener('click', colorToday);
datePickerStore.initDatePicker(
fullCalendarRef,
async (year, month, options) => {
//
await fetchData();
}
);
}); });
</script> </script>
<style scoped> <style scoped>