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

Timepickers united :) #67

Open
kayz1 opened this issue Apr 9, 2013 · 3 comments
Open

Timepickers united :) #67

kayz1 opened this issue Apr 9, 2013 · 3 comments

Comments

@kayz1
Copy link

kayz1 commented Apr 9, 2013

Hey. Great work on Timepicker. I have a question: what do I have to do that these two plugins would work together on the same page ( yours and http://trentrichardson.com/examples/timepicker/). I need both :)

Regards.

@fgelinas
Copy link
Owner

This is something I get asked regulary, here is the procedure to change the timepicker function name :

In the file jquery.ui.timepicker.js :

  • Near the beginning of the file, replace function Timepicker() { with function FGTimepicker() {
  • Around line 130, replace $.extend(Timepicker.prototype, {with $.extend(FGTimepicker.prototype, {
  • Near the end of the file (about 20 lines from the end), replace $.timepicker = new Timepicker(); with $.fgtimepicker = new FGTimepicker();
  • Near the end of the file (about 45 line from the end), replace $.fn.timepicker = function (options) { with $.fn.fgtimepicker = function (options) {
  • Replace all occurences of $.timepicker with $.fgtimepicker

That's about it, tell me if it works for you.

@kayz1
Copy link
Author

kayz1 commented Apr 10, 2013

I guess it's working 👍
I've updated first few lines too:

$.extend($.ui, { fgtimepicker: { version: "0.3.2"} });
var PROP_NAME = 'fgtimepicker',
tpuuid = new Date().getTime();

I suggest something like http://jqueryboilerplate.com/
var pluginName = 'fgtimepicker';

$.fn[pluginName] //compared to $.pluginName

Will be much easier to maintain, update when new version comes out :)

Tnx for now. Keep up 👍

@ova2
Copy link

ova2 commented Apr 26, 2013

Cool, this was helpful. Thanks guys. We use both in JSF and PrimeFaces world too. Would someone send a pull request to the author please?

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

3 participants