onChange not triggered when renderInput is set
When I set the renderInput prop, the onChange event is never triggered. Even if I add the onChange in the input, it does not work. Input and styled input are rendered correctly though.
<Datetime
onChange={(value) => console.log(value)}
renderInput={
(props, open, close) => (
<input
{...props}
onClick={open}
onBlur={close}
/>
)
}
/>
Running version is 2.16.3. Is it a bug or something is missing?
I have a similar problem, I have added custom MaskedInput in renderInput, but when I click in any date in calendar, it doesn't populate in the input field. Without the custom MaskedInput it works just fine. Am I missing a prop here, or its an issue?
<DateTime renderInput={(props, openCalendar) => ( <MaskedInput mask={[/[0-9]/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/]} placeholder="dd/mm/yyyy" onMouseDown={openCalendar} /> )} />
This is still relevant. It happens if I pass onBlur to custom input and closeOnSelect to datepicker component.
Did you guys find anything ? Still relevant for me