import { Dialog } from '@blueprintjs/core'
import { DateInput } from '@blueprintjs/datetime'
<Dialog>
<DateInput />
</Dialog>
Date isn't picked
1st date picked
The source of bug seems to be a function from dateInput.js:214, which adds onBlur event
<Dialog>
<DateInput
popoverProps={{
onOpened: (e) => {
const el = document.querySelector('.DayPicker-Day[tabindex="0"]')
el.addEventListener('blur', (e) => {
e.stopImmediatePropagation()
})
},
}}
/>
</Dialog>
The possible solution above does not handle a case in which the user chooses a different month before selecting the 1st. The solution would need to include another handler to stopImmediatePropagation after dayPickerProps.onMonthChange is fired which is currently overwritten here: https://github.com/palantir/blueprint/blob/5a6ccb20257c6963e483e63b156c04e647909558/packages/datetime/src/dateInput.tsx#L183-L186
I had the same problem and it was fixed by updating the version of @ blueprint/core to 3.15.1. Clean the node_modules by outdated nested dependencies
It works for me in @blueprintjs/core: 3.24.0
Most helpful comment
It works for me in @blueprintjs/core: 3.24.0