Стас Рябцев
Стас Рябцев

Reputation: 1408

react-datepicker shouldCloseOnSelect doesn't work

I added a flag, but for some reason the window doesn’t close when choosing a date https://www.npmjs.com/package/react-datepicker

enter image description here

   <label className="label-block">
            <DatePicker
                selected={date}
                onChange={handleChange}
                placeholderText="Выберите день"
                minDate={moment().toDate()}
                shouldCloseOnSelect={true}
            />
   </label>

Upvotes: 2

Views: 1654

Answers (1)

Sonal Saurabh
Sonal Saurabh

Reputation: 31

keep it out of label tag easy.

Upvotes: 3

Related Questions