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

.timepicker('option', 'xxx') seems to be broken #69

Open
phazei opened this issue May 23, 2013 · 1 comment
Open

.timepicker('option', 'xxx') seems to be broken #69

phazei opened this issue May 23, 2013 · 1 comment

Comments

@phazei
Copy link
Contributor

phazei commented May 23, 2013

EDIT: my bad, disregard. I was using it like so:
.timepicker('option','getTime') but since that's not an actual option, it returned "undefined"

Near line 1405 you have:

        if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string')
            return $.timepicker['_' + options + 'Timepicker'].
                apply($.timepicker, [this[0]].concat(otherArgs));

This returns undefined since:

    $.timepicker['_' + options + 'Timepicker']

always evals to $.timepicker['_optionTimepicker']
so should probably be:

    $.timepicker['_' + arguments[1] + 'Timepicker']

EDIT:
Seems I'm wrong, after playing with it for a while and have figured it out. Unfortunately I wasn't able to find the documentation for that.

@michael-zock
Copy link

Seems I'm wrong, after playing with it for a while and have figured it out. Unfortunately I wasn't able to find the documentation for that.

Could you please be a bit more specific?
I've run into the same problem and without a bit more detail, something as ambiguous as a short "I've figured it out" actually adds to the problem instead of being helpful.

Solution:
Turns out that he was talking about figuring out that the last section of the constructor function allows the use of a shorthand along the lines of $("#startTime").timepicker("destroy");

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