File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change 11# React Tailwindcss Datepicker
22
3- <p align = " center " >
3+ <p style = " text-align : center " >
44 <a href="https://react-tailwindcss-datepicker.vercel.app/" target="_blank">
55 <img alt="React Tailwindcss Datepicker" width="100" style="border-radius: 100%;" src="https://raw.githubusercontent.com/onesine/react-tailwindcss-datepicker/master/assets/img/calendar_logo.svg?raw=true">
66 </a><br><br>
77 A modern date range picker component for React using Tailwind 3 and dayjs. Alternative to Litepie Datepicker which uses Vuejs.
88</p >
99
10- <div align = " center " >
10+ <div style = " text-align : center " >
1111
1212[ ![ npm version] ( https://img.shields.io/npm/v/react-tailwindcss-datepicker?style=flat-square )] ( https://www.npmjs.com/package/react-tailwindcss-datepicker )
1313[ ![ npm downloads] ( https://img.shields.io/npm/dt/react-tailwindcss-datepicker?style=flat-square )] ( https://www.npmjs.com/package/react-tailwindcss-datepicker )
@@ -87,24 +87,24 @@ module.exports = {
8787
8888Then use react-tailwindcss-select in your app:
8989
90- ``` jsx
90+ ``` tsx
9191import React , { useState } from " react" ;
9292import Datepicker from " react-tailwindcss-datepicker" ;
9393
9494const App = () => {
9595 const [value, setValue] = useState ({
96- startDate: new Date () ,
97- endDate: new Date (). setMonth ( 11 )
96+ startDate: null ,
97+ endDate: null
9898 });
9999
100- const handleValueChange = newValue => {
101- console .log (" newValue:" , newValue);
102- setValue (newValue);
103- };
104-
105100 return (
106101 <div >
107- < Datepicker value= {value} onChange= {handleValueChange} / >
102+ <Datepicker
103+ value = { value }
104+ onChange = { newValue => {
105+ setValue (newValue );
106+ }}
107+ />
108108 </div >
109109 );
110110};
You can’t perform that action at this time.
0 commit comments