Open kleviscipi opened 4 years ago
@kleviscipi did you find a solution for that ?
This is an open issue still we are facing. Did any update happen on this?
@manish-sh14 @SarahAlAshwal
I'm using the prop inputComponent
to generate an element (input) by my self with default date values and i'm not using the clear features.
Something like this:
<DatePicker
onChange= {this.onChange}
locale="it"
portal={this.props.portal||false}
icon={this.getIcon()}
placeholder={this.props.placeholder||""}
inputComponent={(props)=>{
let newProps = props
if(!this.getValue()){
newProps.value = ""
}
if( this.state.value && this.getValue() ){
newProps.value = this.state.value
}
return <input type="text" className="form-control" {...newProps} />
}}
initialDate={this.props.initialDate}
/>
Using RangeDatePicker in combination with props clear, the event fire doesn't call the method onChange . I am using this library and it is great but is very necessary for me to have that feature. A props *onClear should be great, which is called when handleInputClear (inside the RangeDatePicker) is fired