From de0a91fdf2e3c399630824f3329857d05bf41824 Mon Sep 17 00:00:00 2001 From: Squalo Date: Sat, 27 Apr 2024 10:25:11 +0200 Subject: [PATCH] fix(QDate): direction declaration (#17145) * Wrong usage of ref * Update QDate.js --------- Co-authored-by: sfn Co-authored-by: Razvan Stoenescu --- ui/src/components/date/QDate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/components/date/QDate.js b/ui/src/components/date/QDate.js index f41406649bf..cb2c13af8c0 100644 --- a/ui/src/components/date/QDate.js +++ b/ui/src/components/date/QDate.js @@ -112,7 +112,7 @@ export default createComponent({ const view = ref(props.defaultView) - const direction = $q.lang.rtl === true ? 'right' : 'left' + const direction = computed(() => ($q.lang.rtl === true ? 'right' : 'left')) const monthDirection = ref(direction.value) const yearDirection = ref(direction.value) @@ -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 }