trentrichardson / jQuery-Timepicker-Addon

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

Adding support for AMD #793

Open oscarcosta opened 9 years ago

oscarcosta commented 9 years ago

Have you considered adding AMD support in your plugin? It's really very useful for many developers. ;) Here an example of how I did:

(function (factory) {
    if (typeof define === 'function' && define.amd) {
        // AMD. Register as an anonymous module.
        define(['jquery', 'jquery.ui'], factory);
    } else {
        // Browser globals
        factory(jQuery);
    }
}(function ($) {
    // JQuery-Timepicker-Addon goes here... :)
}));

More details about the methods for supporting AMD: https://github.com/umdjs/umd

trentrichardson commented 9 years ago

@oscarcosta Thanks for the suggestion. This is now in the dev branch and I hope to get dev tested and merged soon.

NotSqrt commented 9 years ago

It seems it broke localization ..