Skip to content

Commit

Permalink
fix(QTime): update innerValue when using setNow before it's updated f…
Browse files Browse the repository at this point in the history
  • Loading branch information
pdanpdan committed Dec 1, 2021
1 parent 6d778e5 commit c4c2393
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion ui/src/components/time/QTime.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,22 @@ export default Vue.extend({

methods: {
setNow () {
this.__updateValue({
const nowStr = this.__updateValue({
...this.__getCurrentDate(),
...this.__getCurrentTime()
})

const model = __splitDate(
nowStr,
this.computedMask,
this.computedLocale,
this.calendar,
this.defaultDateModel
)

this.innerModel = model
this.isAM = model.hour < 12

this.__goToView('Hour')
},

Expand Down Expand Up @@ -897,6 +909,8 @@ export default Vue.extend({
this.$emit('input', val, date)
}
final === true && this.$emit('change', val, date)

return val
}
},

Expand Down

0 comments on commit c4c2393

Please sign in to comment.