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
TimePicker timeFormatter doesn't seem to be used #1433
Comments
still doesn't work with the latest version |
Please send more information showing what issues you are currently having. Thanks |
Exactly the same as first message. The |
@guestisp @wesdevpro I tested the behavior of <template>
<div class="container is-max-desktop">
<b-timepicker
v-model="dt"
:time-parser="timeParser"
:time-formatter="timeFormatter"
editable
/>
</div>
</template>
<script>
export default {
data() {
return {
dt: new Date()
}
},
methods: {
timeParser(timeStr) {
console.log('timeParser called', timeStr)
const [h, m] = timeStr.split(':')
const dt = new Date()
dt.setHours(parseInt(h))
dt.setMinutes(parseInt(m))
return dt
},
timeFormatter(dt) {
console.log('timeFormatter called', dt)
const h = dt.getHours().toString().padStart(2, '0')
const m = dt.getMinutes().toString().padStart(2, '0')
return `${h}:${m}`
}
}
}
</script> As far as I tested, both |
Interesting. |
Closing this because we cannot reproduce this issue. @guestisp If you could reopen when you can provide more information to reproduce this problem. Thank you! |
Buefy version: 0.7.6
Vuejs version: 2.6.10
Description
Steps to reproduce
Expected behavior
myTimeFormatter
gets called and debug message displayed.Actual behavior
Formatter function is never called.
Looking at the code for TimePickerMixin, the prop is read, but never used (only the formatter from config).
The text was updated successfully, but these errors were encountered: