Skip to content

Commit d8c6f4c

Browse files
committed
feat(ui): QCalendarResource can now have a view that doesn't default to a "day"
Right now it's difficult to tell when you go from one day to the next. This is where the developer needs to indicate a date for the visible view or create some other sort of indicator (each day has a different background, etc).
1 parent 8819ae1 commit d8c6f4c

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

ui/src/components/QCalendarResource.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,17 @@ export default defineComponent({
110110
lastStart = ref(null),
111111
lastEnd = ref(null)
112112

113-
const parsedView = computed(() => {
114-
return 'day'
115-
})
113+
watch(() => props.view, () => {
114+
// reset maxDaysRendered
115+
maxDaysRendered.value = 0
116+
})
117+
118+
const parsedView = computed(() => {
119+
if (props.view === 'month') {
120+
return 'month-interval'
121+
}
122+
return props.view
123+
})
116124

117125
const parsedCellWidth = computed(() => {
118126
return parseInt(props.cellWidth, 10)

0 commit comments

Comments
 (0)