Skip to content

Commit f2ba136

Browse files
committed
fix(QDate): (backport from Qv2) the "set today" button should not unset model
1 parent b903b0a commit f2ba136

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ui/src/components/date/QDate.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,13 @@ export default Vue.extend({
696696

697697
methods: {
698698
setToday () {
699-
this.__toggleDate(this.today, this.__getMonthHash(this.today))
699+
const date = this.today
700+
const month = this.daysMap[this.__getMonthHash(date)]
701+
702+
if (month === void 0 || month.includes(date.day) === false) {
703+
this.__addToModel(date)
704+
}
705+
700706
this.setCalendarTo(this.today.year, this.today.month)
701707
},
702708

0 commit comments

Comments
 (0)