It would be nice to be able to pass down to Flatpickr itself some options that are you can't set on the flatpickr instance itself (ie. inline: true)
In the React DatePicker component it's a matter of adding a prop and then spreading it when initing flatpickr
We do have the need to have an inline/static picker on carbon-addons-iot for this story
As it right now, we are reparenting the calendar DOM into our component but this is far from the best option to do it.
For now we are going with the workaround but it would be nice to have soon :)
I can contribute back myself but I need some support from the Carbon team given that adding a new prop to DatePicker would break semver.
Thanks!
I believe the restriction on flatpickr options configuration is intentional, specifically around the inline prop
cc @carbon-design-system/design on whether or not inline date picker is a valid variant within the design system
It was originally intentional to not include the inline format for datepicker. I think if we wanted to include it, it would need some visual exploration because of the calendar icon. This topic needs some investigation from the design perspective before we can determine if we should do it or not.
hi @aagonzales! design-wise you can also ping @lukefirth and @cynthiaz who worked on https://github.com/IBM/carbon-addons-iot-react/issues/854
Along the same lines, it would be nice to be able to pass down disabled and enabled flags to flatpickr, which we're currently unable to do. Our use case is that only certain days should be selectable based on availability.
Most helpful comment
It was originally intentional to not include the inline format for datepicker. I think if we wanted to include it, it would need some visual exploration because of the calendar icon. This topic needs some investigation from the design perspective before we can determine if we should do it or not.