This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState } from "react"; | |
import { | |
format, | |
startOfWeek, | |
addDays, | |
startOfMonth, | |
endOfMonth, | |
endOfWeek, | |
isSameMonth, | |
isSameDay, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.... | |
import { | |
format, | |
startOfWeek, | |
addDays, | |
startOfMonth, | |
endOfMonth, | |
endOfWeek, | |
isSameMonth, | |
isSameDay, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.... | |
import { | |
format, | |
startOfWeek, | |
addDays, | |
startOfMonth, | |
endOfMonth, | |
endOfWeek, | |
isSameMonth, | |
isSameDay |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.... | |
import { format, startOfWeek, addDays } from "date-fns"; | |
const Calendar = () => { | |
.... | |
const getWeekDaysNames = () => { | |
const weekStartDate = startOfWeek(activeDate); | |
const weekDays = []; | |
for (let day = 0; day < 7; day++) { | |
weekDays.push( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.... | |
import { AiOutlineLeft, AiOutlineRight } from "react-icons/ai"; | |
import { format } from "date-fns"; | |
const Calendar = () => { | |
.... | |
const getHeader = () => { | |
return ( | |
<div class="header"> | |
<div className="todayButton">Today</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.App { | |
font-family: sans-serif; | |
text-align: center; | |
color: #212121; | |
} | |
.changeMonth { | |
margin: 0px 20px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState } from "react"; | |
const Calendar = () => { | |
const [selectedDate, setSelectedDate] = useState(new Date()); | |
const [activeDate, setActiveDate] = useState(new Date()); | |
const getHeader = () => {}; | |
const getWeekDaysNames = () => {}; | |
const getDates = () => {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import "./styles.css"; | |
import Calendar from "./Calendar"; | |
export default function App() { | |
return ( | |
<div className="App"> | |
<Calendar /> | |
</div> | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
const Calendar = () => { | |
const getHeader = () => {}; | |
const getWeekDaysNames = () => {}; | |
const getDates = () => {}; | |
return ( | |
<section> | |
{getHeader()} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
const Calendar = () => { | |
return <section>Hello Calendar</section>; | |
}; | |
export default Calendar; |
NewerOlder