Changed calendar layout for buttons
This commit is contained in:
@@ -149,8 +149,6 @@ const eventsNotDisplayed: ComputedRef<number> = computed<number>(() => eventsFo
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// .tile are the direct children of the grid
|
||||
// We need to get, between each element, a 1px solid line to separate them, for columns and rows
|
||||
.tile {
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
|
||||
@@ -6,6 +6,9 @@ const { currentDate, decrementViewMonth, incrementViewMonth } = useCalendar()
|
||||
const { currentMonthData } = storeToRefs(useCalendar())
|
||||
|
||||
function handleWheel(e: WheelEvent) {
|
||||
// Prevent scrolling
|
||||
e.preventDefault()
|
||||
|
||||
const isMovingUp = e.deltaY < 0
|
||||
if (isMovingUp) {
|
||||
moveCalendarLeft()
|
||||
@@ -24,7 +27,7 @@ const moveCalendarRight = useThrottleFn(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="grid grid-cols-10" @wheel="handleWheel">
|
||||
<div class="grid grid-cols-5 md:grid-cols-7 lg:grid-cols-10" @wheel="handleWheel">
|
||||
<template v-if="currentMonthData">
|
||||
<CalendarStateMonthlyDayTile
|
||||
v-for="day in currentMonthData?.days"
|
||||
|
||||
Reference in New Issue
Block a user