tamble / jquery-ui-daterangepicker

A JQuery UI based date range picker.
MIT License
184 stars 110 forks source link

How can I use this with Require JS? #41

Open Octania opened 8 years ago

Octania commented 8 years ago

I am unable to call or instantiate the date picker using Require JS: How can I use this with Require JS?

$(function() {
    $('#e2').daterangepicker({
        datepickerOptions: {
            numberOfMonths: 2
        }
    });
});

Like this:

require(['jquery', 'jquery-ui', 'moment', 'comiseo.daterangepicker'], function ($, moment) {

$(function() {
    $('#e2').daterangepicker({
        datepickerOptions: {
            numberOfMonths: 2
        }
    });
});

});

MartinYounghoonKim commented 5 years ago

Is somebody solved this problem ?

MartinYounghoonKim commented 5 years ago

I solved this problem, and this is example. https://github.com/MartinYounghoonKim/requirejs-moment-compatibility-env