Skip to content

Commit 4562e6e

Browse files
committed
chore(QDate): small tweaks
1 parent b471271 commit 4562e6e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ui/src/components/date/QDate.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,14 @@ export default Vue.extend({
7373
innerMask = this.__getMask(),
7474
innerLocale = this.__getLocale(),
7575
viewModel = this.__getViewModel(innerMask, innerLocale),
76+
year = viewModel.year,
7677
direction = this.$q.lang.rtl === true ? 'right' : 'left'
7778

7879
return {
7980
view: this.defaultView,
8081
monthDirection: direction,
8182
yearDirection: direction,
82-
startYear: viewModel.year - viewModel.year % yearsInterval - (viewModel.year < 0 ? yearsInterval : 0),
83+
startYear: year - (year % yearsInterval) - (year < 0 ? yearsInterval : 0),
8384
editRange: void 0,
8485
innerMask,
8586
innerLocale,
@@ -1349,7 +1350,7 @@ export default Vue.extend({
13491350
: this.encodeObjectFn(date, mask, locale)
13501351
},
13511352

1352-
__addToModel (date, reason) {
1353+
__addToModel (date) {
13531354
let value
13541355

13551356
if (this.multiple === true) {

0 commit comments

Comments
 (0)