time format for time picker does not work
Closed this issue · 1 comments
pcherna commented
Bug Report
Environment
- Extension version(s):6.1.15
- Bulma version: 0.92
- OS: OSX 10.14.6[
- Browser: all
- How you are customizing the extension: no
Current Behavior
My plain HTML input has a time whose format is HH:MM:ss, with a non-zero value (e.g. "01:25:00"), but when I call bulmaCalendar.attach(), the initial value show in the time picker is zero. Upon save, the result back in the field is shifted (hours->minutes, minutes->seconds), e.g. changing to "02:30" and Save produces a value of "00:02:30".
Possible Solution
By inspection, src/js/index.js has an obvious copy/paste bug:
// Set timeFormat (set to HH:MM:SS by default)
set timeFormat(timeFormat) {
this.timePicker.dateFormat = timeFormat;
// ^^^^^^^^^^
return this;
}
Which should be this.timePicker.timeFormat = timeFormat;
I'm assuming this is the only problem, was not in a great position to test.
michael-hack commented
Thank you for your help. I've merged the pull request.