Rudeg / react-input-calendar

http://rudeg.github.io/react-input-calendar/
MIT License
139 stars 94 forks source link

Render error #79

Closed adamellsworth closed 8 years ago

adamellsworth commented 8 years ago
"react": "^15.0.1",
"react-input-calendar": "^0.3.1",

Usage:

var Calendar = require('react-input-calendar');
// ... render method
return <Calendar format="DD/MM/YYYY" date="4-12-2014"/>;

warning/erros

Warning: React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components). Check the render method of `Filters`.

Uncaught Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. Check the render method of `Filters`.

Webpack config:

// ... loaders
{
    test: /\.jsx?$/,
    exclude: /(node_modules|bower_components|models)/,
    loader: 'babel',
    query: {
        presets: ['react', 'es2015']
    }
}
adamellsworth commented 8 years ago

For future reference this fixed it:

import Calendar from 'react-input-calendar';

Rudeg commented 8 years ago

Thanks, fixed in the readme