fix: update example in README to use SingleDatePicker instead of WeekPicker
All checks were successful
Publish to npm / publish (push) Successful in 24s
All checks were successful
Publish to npm / publish (push) Successful in 24s
This commit is contained in:
parent
2c48ddbdb2
commit
397103b636
37
README.md
37
README.md
|
@ -30,28 +30,27 @@ Here is an example of how to use Datenel in your React application:
|
||||||
|
|
||||||
```tsx
|
```tsx
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { WeekPicker } from 'datenel-react'
|
import { SingleDatePicker } from 'datenel-react'
|
||||||
import './app.scss'
|
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
function onSelect(value) {
|
function onSelect(value) {
|
||||||
alert(`You selected ${value.year}-${value-month}-${value.day}`)
|
alert(`You selected ${value.year}-${value-month}-${value.day}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='app'>
|
<div className='app'>
|
||||||
<div className="border">
|
<div className="border">
|
||||||
<WeekPicker
|
<SingleDatePicker
|
||||||
value={{
|
value={{
|
||||||
year: 2025,
|
year: 2025,
|
||||||
month: 1,
|
month: 1,
|
||||||
day: 1
|
day: 1
|
||||||
}}
|
}}
|
||||||
onSelect={onSelect}
|
onSelect={onSelect}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user