react-datepicker icon indicating copy to clipboard operation
react-datepicker copied to clipboard

Can't get it working with my current React form

Open jimyu2006 opened this issue 9 years ago • 1 comments

my config as below: require.config({ paths: { ... 'react-onclickoutside': '/node_modules/react-onclickoutside/dist/react-onclickoutside.min', 'react-datepicker': '/node_modules/react-datepicker/lib/index', })

Firstly, it complains an error: Module name 'react-onclickoutside' has not been loaded yet for context: _.

In the index.js file update var onClickOutside = _interopDefault(require('react-onclickoutside'));
To var onClickOutside = _interopDefault(require(['react-onclickoutside']));

Fixed that issue. But then complains 'module' undefined.

update module.exports = DatePicker; to define(function (exports, module) { module.exports = DatePicker; });

Then still complain require.js with Uncaught TypeError: a.slice is not a function ...

Does it has to go with webpack? We haven't got webpach yet...

It drives me crazy. Did I miss something or did something wrong? The example works fine, however the react-datepicker.js code is so different with the one in the example folder.

jimyu2006 avatar Nov 07 '17 02:11 jimyu2006

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 30 '19 19:08 stale[bot]