Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix in Qdate using direction #17145

Merged
merged 3 commits into from
Apr 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions ui/src/components/date/QDate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)

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