|
|
@ -6,6 +6,10 @@ import './index.css'; |
|
|
|
|
|
|
|
|
|
|
|
const SimpleCalendar = () =>{ |
|
|
|
const SimpleCalendar = () =>{ |
|
|
|
const [selectedDay, setSelectedDay] = useState(null); |
|
|
|
const [selectedDay, setSelectedDay] = useState(null); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const gotoToday = () =>{ |
|
|
|
|
|
|
|
setSelectedDay(utils('fa').getToday()); |
|
|
|
|
|
|
|
} |
|
|
|
return( |
|
|
|
return( |
|
|
|
<div className="flex items-center justify-center w-full my-2"> |
|
|
|
<div className="flex items-center justify-center w-full my-2"> |
|
|
|
|
|
|
|
|
|
|
@ -13,6 +17,7 @@ const SimpleCalendar = () =>{ |
|
|
|
value={selectedDay} |
|
|
|
value={selectedDay} |
|
|
|
onChange={setSelectedDay} |
|
|
|
onChange={setSelectedDay} |
|
|
|
shouldHighlightWeekends |
|
|
|
shouldHighlightWeekends |
|
|
|
|
|
|
|
renderFooter={() => <center><button onClick={gotoToday}>برو به امروز</button></center>} |
|
|
|
locale="fa" // add this
|
|
|
|
locale="fa" // add this
|
|
|
|
/> |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|