0

I am trying to prevent the user to edit the input text area by typing, allowing only changes made with the pop up calendar.... I followed the documentation but the property allowEdit is not working on my code

<DateRangePickerComponent
      cssClass="customCSS"          
      placeholder="Select date range"
      allowEdit= "false"
      onChange={this.dateRangeHandler}
    />

I am also finding not so easy to style this Date Picker...is inheriting all the style from his parent component so I need to customise every single bit of it...

Dharman
  • 30,962
  • 25
  • 85
  • 135
ale1a1
  • 1

1 Answers1

0

We need to define the allowEdit property with correct JSX syntax in the react platform to get rid of the reported issue.

<DateRangePickerComponent
cssClass="customCSS"
placeholder="Select date range"
allowEdit={false}
onChange={this.dateRangeHandler}
/>

Sample: https://stackblitz.com/edit/react-6jwtbf

enter image description here

Please refer the below documentation to know more about this.

How are boolean props used in React?

https://reactjs.org/docs/introducing-jsx.html

Dharman
  • 30,962
  • 25
  • 85
  • 135