cljsjs

timo 2018-04-03T12:15:29.000156Z

Hi there, I just wanted to update react-datepicker and tried to do it like in https://github.com/cljsjs/packages/blob/master/react-datepicker/resources/cljsjs/react-datepicker/common/react-datepicker.ext.js Thing is, that it does not find any DatePicker namespace. I used dependencies like that:

<https://cdnjs.cloudflare.com/ajax/libs/react/16.3.0/umd/react.production.min.js>
<https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.3.0/cjs/react-dom.production.min.js>
<https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.0/moment.js>
<https://rawgit.com/Pomax/react-onclickoutside/v6.7.1/dist/react-onclickoutside.js>
<https://cdnjs.cloudflare.com/ajax/libs/react-datepicker/1.4.0/react-datepicker.js>
on https://tomjkidd.github.io/javascript-externs-generator/ like in the ext-file. My suspicion is that https://cdnjs.cloudflare.com/ajax/libs/react-datepicker/0.53.0/react-datepicker.js compared to https://cdnjs.cloudflare.com/ajax/libs/react-datepicker/1.4.0/react-datepicker.js seems minified. I have not too much clue about all this js-stuff but it looks quite different and I cannot find exports["DatePicker"] in the 1.4 version. Anyone has an idea what the problem is? Thanks in advance!

juhoteperi 2018-04-03T14:27:17.000363Z

@timok Check browser console. React-dom url is wrong and react-datepicker can't be loaded without react-dom.

juhoteperi 2018-04-03T14:28:18.000247Z

Though there is some error even with correct react-dom umd url

juhoteperi 2018-04-03T14:29:58.000480Z

Okay, React-datepicker requires PropTypes also, this list works:

<https://cdnjs.cloudflare.com/ajax/libs/react/16.3.0/umd/react.production.min.js>
<https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.3.0/umd/react-dom.production.min.js>
<https://cdnjs.cloudflare.com/ajax/libs/prop-types/15.6.1/prop-types.min.js>
<https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.0/moment.js>
<https://rawgit.com/Pomax/react-onclickoutside/v6.7.1/dist/react-onclickoutside.js>
<https://cdnjs.cloudflare.com/ajax/libs/react-datepicker/1.4.0/react-datepicker.js>

timo 2018-04-03T14:38:59.000303Z

Thanks! 👍

timo 2018-04-03T14:39:25.000041Z

I will try to update it and will try to make a PR.