Skip to content
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

time format for time picker does not work #292

Closed
pcherna opened this issue Feb 12, 2022 · 1 comment
Closed

time format for time picker does not work #292

pcherna opened this issue Feb 12, 2022 · 1 comment

Comments

@pcherna
Copy link
Contributor

pcherna commented Feb 12, 2022

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 added a commit that referenced this issue Feb 23, 2022
fix timeFormat setter was writing to wrong member #292
@michael-hack
Copy link
Owner

Thank you for your help. I've merged the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants