Added basic search and jump function

This commit is contained in:
Alexis
2024-04-05 16:45:17 +02:00
parent 14d50c921d
commit fda2e05d99
6 changed files with 173 additions and 67 deletions

View File

@@ -296,10 +296,14 @@ export const useCalendar = defineStore('calendar', () => {
return JSON.stringify({ ...date1 }) === JSON.stringify({ ...date2 })
}
function jumpToDate(date: LeimDate) {
params.day = date.day.toString()
params.month = date.month.toString()
params.year = date.year.toString()
}
function jumpToDefaultDate() {
params.day = defaultDay.toString()
params.month = defaultMonth.toString()
params.year = defaultYear.toString()
jumpToDate(defaultDate.value)
currentConfig.value.viewType = 'month'
}
@@ -316,6 +320,7 @@ export const useCalendar = defineStore('calendar', () => {
setMonth,
incrementYear,
decrementYear,
jumpToDate,
jumpToDefaultDate,
compareTwoDates,
getFormattedDateTitle,