r/reactjs • u/Yourmamauw • 18d ago
Show /r/reactjs Looking for feedback on my React Date Time pickers in @allxsmith/bestax-bulma
I built some date time pickers in my react bulma component library
https://github.com/allxsmith/bestax
Looking for some feedback. What do you like, what needs improvement.
DateInput
https://bestax.io/docs/api/form/datetime/dateinput#basic-dateinput
DateRangeInput
https://bestax.io/docs/api/form/datetime/daterangeinput#basic-daterangeinput
DateTimeInput
https://bestax.io/docs/api/form/datetime/datetimeinput#basic-datetimeinput
TimeInput
https://bestax.io/docs/api/form/datetime/timeinput#basic-timeinput
For the time selection, I implemented IOS inspired time wheels. One problem I faced: was the lack of haptic feedback APIs exposed by browsers in IOS. As a workaround, the time-wheels make a clicking sound to fake the feeling of haptics. (Android does have haptic feedback apis, no problems there)
Note: this is based off Bulma CSS, so the look and feel is opinionated.
1
u/nameupp 17d ago
faking haptics with web audio clicks is a clever workaround for ios safari locking down navigator.vibrate, but watch out for audio context state during rapid wheel flings; if someone flicks the inertia wheel, firing overlapping oscillator or buffer nodes on every notch easily causes crackling audio distortion unless you reuse a single gain node with an aggressive decay envelope. the other classic headache with custom time wheels is keyboard a11y, specifically mapping arrow keys to aria-spinbutton with proper aria-valuenow so screen readers announce incremented minutes without needing touch emulation. curious if the date range picker handles timezone shifting on controlled value props or stores plain yyyy-mm-dd strings under the hood imo
1
u/IntroductionGlad7634 16d ago
I like the clicking noise on the time examples. It almost feels like my iPhone is buzzing when I spin the wheel.I like the clicking noise on the time examples.