material-date-range-picker
material-date-range-picker copied to clipboard
Allow for custom labels
I can write a test as well but you can also demo here by choosing to pass in label prop or not: https://codesandbox.io/s/62k69jmj0n
Thx for your contribution! 💯
I would like to avoid passing all the the input props down into the component.
Because I think there are a lot more use cases apart from the label.
As stated yesterday I think we should go a more abstract route:
https://github.com/jonas-arkulpa/material-date-range-picker/issues/9#issuecomment-467221756
Have you got some ideas how we could make it this way?
My idea was to mimic the downshift api and just pass down patched versions of getLabelProps
and getInputProps
as render props.
This way anyone can use any input with the date picker.
Really like the code sandbox. Is it also possible to connect it to the example from the repository (to stay in sync)? Would like to add it here: https://github.com/geeofree/kalendaryo#examples
Here is an example that will stay up to date via npm: https://codesandbox.io/s/zwzo0qojyx
As for how to proceed with a more generic approach, I will defer to you on that. I am happy to contribute once you have an idea to move forward with. For now, I will remove label manually.
Hey Bryce Montano, sry for being silent regarding this topic for so long! Have not intended to discourage you or diminish your work! Unfortunately I haven't looked into the project for a while, as I do not use the picker myself atm. Had quite clear ideas how I wanted to go with it back than. Would be happy if someone else would take over the maintenance - especially if the person themself uses the picker. ❤️