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

How can I use this with Require JS? #41

Open
Octania opened this issue Dec 12, 2015 · 2 comments
Open

How can I use this with Require JS? #41

Octania opened this issue Dec 12, 2015 · 2 comments

Comments

@Octania
Copy link

Octania commented Dec 12, 2015

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
Copy link

Is somebody solved this problem ?

@MartinYounghoonKim
Copy link

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

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