DateRangePicker / TimeField utilizing shouldCloseOnSelect - S2 #8837
-
I had been looking through the spectrum code for the DateRangePicker, and I noticed that the When looking at s2, I noticed that hook from If anyone is doing something similar, I would love some insight into how this is working. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I'm sorry, I'm not following, I'm seeing the date range picker close when a selection is made https://react-spectrum.adobe.com/s2/index.html?path=/docs/daterangepicker--docs S2 does use the hooks, it just uses it through the React Aria Components. |
Beta Was this translation helpful? Give feedback.
I'm sorry, I'm not following, I'm seeing the date range picker close when a selection is made https://react-spectrum.adobe.com/s2/index.html?path=/docs/daterangepicker--docs
Where are you seeing this not the case?
S2 does use the hooks, it just uses it through the React Aria Components.
react-spectrum/packages/@react-spectrum/s2/src/DateRangePicker.tsx
Line 82 in 661ba8e
react-spectrum/packages/react-aria-components/src/DatePicker.tsx
Line 200 in 661ba8e