R
R
retyu2016-11-09 14:01:57
JavaScript
retyu, 2016-11-09 14:01:57

What's up with react-datepicker?

Good afternoon! I'm trying to install datepicker on react/redux and it doesn't quite work.
I am using this package .
For now, I just want to output a simple datepicker.
The code

import DatePicker from 'react-datepicker';
import moment from 'moment';

const DayPickerSection = ({}) => {
    return (
        <div>
            <DatePicker selected={moment()}/>
        </div>
    );
};

export default DayPickerSection;

An input is displayed with today's date and numbers in a column. What is the problem?
How to properly use it with redux ? Perhaps there are some examples?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim, 2016-11-09
@retyu

Probably forgot to include the file with styles.

require('react-datepicker/dist/react-datepicker.css');

R
retyu, 2016-11-09
@retyu

What the datepicker looks
like
817208ae676f4f86a490669ce543aaf3.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question