Skip to content

Commit

Permalink
Update QDate.js
Browse files Browse the repository at this point in the history
  • Loading branch information
rstoenescu committed Apr 27, 2024
1 parent 0149d6c commit 19f4bb0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ui/src/components/date/QDate.js
Expand Up @@ -112,9 +112,9 @@ export default createComponent({

const view = ref(props.defaultView)

const direction = $q.lang.rtl === true ? 'right' : 'left'
const monthDirection = ref(direction)
const yearDirection = ref(direction)
const direction = computed(() => ($q.lang.rtl === true ? 'right' : 'left'))
const monthDirection = ref(direction.value)
const yearDirection = ref(direction.value)

const year = viewModel.value.year
const startYear = ref(year - (year % yearsInterval) - (year < 0 ? yearsInterval : 0))
Expand Down Expand Up @@ -931,7 +931,7 @@ export default createComponent({
const newHash = year + '/' + pad(month) + '/01'

if (newHash !== viewModel.value.dateHash) {
monthDirection.value = (viewModel.value.dateHash < newHash) === ($q.lang.rtl !== true) ? 'left' : 'right'
monthDirection.value = (viewModel.value.dateHash < newHash) === direction.value
if (year !== viewModel.value.year) {
yearDirection.value = monthDirection.value
}
Expand Down

0 comments on commit 19f4bb0

Please sign in to comment.