Skip to content

Commit 78f1d9d

Browse files
committed
fix(QDate): emitImmediately not working correctly quasarframework#7840
1 parent 0927de2 commit 78f1d9d

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

ui/src/components/date/QDate.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ export default Vue.extend({
4343
events: [ Array, Function ],
4444
eventColor: [ String, Function ],
4545

46-
// DEPRECATED; TODO: remove in v2
4746
emitImmediately: Boolean,
4847

4948
options: [ Array, Function ],
@@ -135,11 +134,10 @@ export default Vue.extend({
135134
(this.disable === true ? ' disabled' : (this.readonly === true ? ' q-date--readonly' : ''))
136135
},
137136

138-
// DEPRECATED; TODO: remove in v2
139137
isImmediate () {
140138
return this.emitImmediately === true &&
141-
this.daysModel[0] !== void 0 &&
142-
this.daysModel[0].dateHash !== null
139+
this.multiple !== true &&
140+
this.range !== true
143141
},
144142

145143
normalizedModel () {
@@ -1303,9 +1301,10 @@ export default Vue.extend({
13031301
this.$emit('input', value, reason, details)
13041302
},
13051303

1306-
// DEPRECATED - TODO: remove in v2
13071304
__emitImmediately (reason) {
1308-
const date = this.daysModel[0]
1305+
const date = this.daysModel[0] !== void 0 && this.daysModel[0].dateHash !== null
1306+
? this.daysModel[0]
1307+
: { ...this.viewModel } // inherit day, hours, minutes, milliseconds...
13091308

13101309
// nextTick required because of animation delay in viewModel
13111310
this.$nextTick(() => {

ui/src/components/date/QDate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158

159159
"emit-immediately": {
160160
"type": "Boolean",
161-
"desc": "(DEPRECATED from v1.13) Emit model when user browses month and year too; Only for single selection (non-multiple, non-range)",
161+
"desc": "Emit model when user browses month and year too; ONLY for single selection (non-multiple, non-range)",
162162
"category": "model"
163163
}
164164
},

0 commit comments

Comments
 (0)