trentrichardson / jQuery-Timepicker-Addon

Adds a timepicker to jQueryUI Datepicker
http://trentrichardson.com/examples/timepicker/
MIT License
2.66k stars 1.05k forks source link

jQuery UI 1.12 support #891

Open mdprw opened 7 years ago

mdprw commented 7 years ago

Hello,

Are you planing to update the plugin to support jQuery UI 1.12? For example buttonset widget (used by jQuery-SliderAccess) has been deprecated in favor of controlgroup.

Thanks in advance!

scoumbourdis commented 7 years ago

Hello @mdprw

Do you have any work-around for this? Maybe a small hack can fix this issue?

trentrichardson commented 7 years ago

If there is a fix and someone can send a pull request to the dev branch I will be happy to review it and merge. I'm sorry my current schedule does not allow for much development time on this project, I can use all the help I can get.

https://github.com/trentrichardson/jQuery-Timepicker-Addon/issues/874

scoumbourdis commented 7 years ago

@mdprw the latest version WORKS with the latest version of jQuery UI 1.12. I did also tried it in jQuery version 2 and jQuery version 3 and it is working like a charm.

Are you getting any error?

In order to help someone else, it seems that I didn't have the slider at the jQuery UI custom. As most of the people may only add the datepicker... and not the slider, make sure that you are adding:

@trentrichardson I am going to create a pull request in order to throw a warning that the slider plugin doesn't exist so developers will at least get a notice that the slider function is not defined. Is that acceptable or you are ignoring this on purpose?

Thanks Johnny

trentrichardson commented 7 years ago

@scoumbourdis I was trying to work towards not requiring that slider be available. Sometimes it is simply unnecessary baggage, although it is a much more polished experience.

I'd say if you passed "slider" as a controlType but it is not available then throw a notice, otherwise (if you didn't specify a controlType) it should figure out the best available control to use.

trentrichardson commented 7 years ago

@scoumbourdis I think @mdprw was referring to the built in support for "addSliderAccess" option that uses an extra jquery plugin. In hind sight that option and plugin was poorly organized as it never had an official repo and lived inside this project only. However I think this is the part that is being referred to in the first post.

https://github.com/trentrichardson/jQuery-Timepicker-Addon/blob/master/src/jquery-ui-sliderAccess.js

mdprw commented 7 years ago

I created PR #893 with the changes to support new api of jQuery 1.12. Please note that api 1.11 (deprecated) is built on top of version 1.12 to mantain compatibility and will be removed in next release (1.13). You must set $.uiBackCompat flag to false to use only api 1.12. You can read more here:

https://jqueryui.com/upgrade-guide/1.12/

The changes involve the slider and the stylesheet to position the icon correctly

trentrichardson commented 7 years ago

Thanks @mdprw , I will read the upgrade guide and have a look at your changes. I appreciate your contributions.

mdprw commented 7 years ago

I noticed a made the PR to the master branch instead of dev. I can make a new PR to dev branch if you need.

trentrichardson commented 7 years ago

Yes, I would appreciate that if you don't mind

mdprw commented 7 years ago

I created a new PR #894 and closed the other. I don't know why but i couldn't remove the new line char at end of file. Maybe is because I'm editing the code directly from github website.

trentrichardson commented 7 years ago

@mdprw Thanks, I'll try to review it soon. I haven't had a chance to look at the upgrade guide yet either as I've been tied up with work, but does this mean the new changes are compatible with 1.12+ and not backwards compatible?

mdprw commented 7 years ago

@trentrichardson That's correct. The new api rewrite is not backwards compatible. Fortunately most changes are simply to introduce. If you're not ready to upgrade yet, you'll have to stick to API 1.11 which will work until version 1.13 cames out