1

I need to integrate SingleDatePicker from react-dates.

This is what I have written in the code

<SingleDatePicker
    date={moment()} 
    onDateChange={date => this.setState({ date })} 
    focused={this.state.focused}
    onFocusChange={({ focused }) => this.setState({ focused })}
    id="your_unique_id"
/>

Now it shows me double calendar.

enter image description here

But I need to show only single. Something like this

enter image description here

Is there any option in the SingleDatePicker to do this?

TylerH
  • 20,799
  • 66
  • 75
  • 101
Profer
  • 553
  • 8
  • 40
  • 81
  • lokk that :http://airbnb.io/react-dates/?selectedKind=SDP%20-%20Calendar%20Props&selectedStory=single%20month&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Factions%2Factions-panel – Angelotti Jan 30 '19 at 08:13

1 Answers1

2

you can try this:

<SingleDatePicker
    date={moment()} 
    onDateChange={(date) => this.setState({ date })}
    numberOfMonths={1},
    focused={this.state.focused}
    onFocusChange={({ focused }) => this.setState({ focused })}
    id="your_unique_id"
/>
Profer
  • 553
  • 8
  • 40
  • 81
Angelotti
  • 673
  • 1
  • 6
  • 20