Skip to content

Option 'step' or 'stepMinute' not honoured by controlType 'select' timepicker #689

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

Closed
clrg opened this issue Feb 6, 2014 · 6 comments
Closed

Comments

@clrg
Copy link

clrg commented Feb 6, 2014

The following options seem to have no effect for controlType 'select' in v1.4.3. Unfortunately I couldn't produce a fix beyond hacking in the step we wanted in the _controls.select.create function due to time constraints. I can confirm, however, the 'step' is always 1.

   $(this).timepicker({
        controlType: 'select',
        step: 15,
        stepMinute: 15
    });
@clrg
Copy link
Author

clrg commented Feb 6, 2014

OK I got annoyed and tried harder. This appears to be the fix - adding step: this._defaults.stepMinute: to the minute_slider creation point.

Line 674-5 for me:

if (this.minute_slider) {
    this.control.options(this, this.minute_slider, 'minute', { min: this._defaults.minuteMin, max: minMax, step: this._defaults.stepMinute });

@trentrichardson
Copy link
Owner

Thanks for posting your changes. I've updated the dev branch accordingly. If you have a moment to test it on your app?..

@clrg
Copy link
Author

clrg commented Mar 3, 2014

Hi Trent,

You didn't update the dist/ version yet:
https://github.com/trentrichardson/jQuery-Timepicker-Addon/blob/master/dist/jquery-ui-timepicker-addon.js

Sorry, I'm a bit of a noob at these things so it wasn't immediately obvious how to generate it myself. Node.js?

@trentrichardson
Copy link
Owner

Hey @clrg its in the dev branch. With git you can create branches. This is ideal if you want to keep a stable copy (master branch) and still keep a development copy (dev branch). All changes are made to the dev branch. When dev branch feels stable it will be moved to the master branch. So theoretically changes are never made directly to the master branch. This way you should always be able to grab the master branch and have a stable copy of code. However most of the time the dev branch works fine too, and many cases includes fixes, it may not have been tested.

With nodejs and grunt the project now have tests written with it so it can have certain tests run agains it as it changes. This also helps keep things more stable (even the dev branch)

Here is a link to the dev branch (notice the url says "tree/dev"):

https://github.com/trentrichardson/jQuery-Timepicker-Addon/tree/dev

Different projects may be organized differently.. but generally follow a similar flow.

@trentrichardson
Copy link
Owner

Also I want to wrap up the dev branch soon but just haven't had a moment to polish a couple new additions some other contributors sent over. Their changes are working fine, but I wanted to expand those a little to make the code more consistent.

@clrg
Copy link
Author

clrg commented Mar 3, 2014

Thanks, I'll try those out! I did spot the dev branch but didn't think to look in the dist/ folder there. Obviously more/stronger coffee is required.

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