Skip to content

Commit b84b9c1

Browse files
committed
Add note on native alternative
1 parent 0326ef1 commit b84b9c1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/react-daterange-picker/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ A minimal demo page can be found in `sample` directory.
2020

2121
[Online demo](https://projects.wojtekmaj.pl/react-daterange-picker/) is also available!
2222

23+
## Consider native alternative
24+
25+
If you don't need to support legacy browsers and don't need the advanced features this package provides, consider using native date input instead. It's more accessible, adds no extra weight to your bundle, and works better on mobile devices.
26+
27+
```tsx
28+
<input aria-label="Date from" max={valueTo} min={minDate} type="date" />
29+
<input aria-label="Date to" max={maxDate} min={valueFrom} type="date" />
30+
```
31+
2332
## Looking for a time picker or a datetime picker?
2433

2534
React-DateRange-Picker will play nicely with [React-Date-Picker](https://github.com/wojtekmaj/react-date-picker), [React-Time-Picker](https://github.com/wojtekmaj/react-time-picker) and [React-DateTime-Picker](https://github.com/wojtekmaj/react-datetime-picker). Check them out!

0 commit comments

Comments
 (0)