Calender Side Bar on Click
This commit is contained in:
@@ -17,23 +17,34 @@ export default function BasicDateCalendar(p) {
|
||||
generateCalendar(startString, endString)
|
||||
check = false
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={"Allround"}>
|
||||
<div className={"Down"}>
|
||||
{result.map((monthResult, index = 0) => (
|
||||
<div key={months} className={"A box-shadow"} >
|
||||
{result.map((monthResult, index) => (
|
||||
<div className={"A box-shadow"} onClick={() => p.onMonthClick(
|
||||
(parseInt(startParts[1]) + index),
|
||||
startParts
|
||||
)} >
|
||||
<p style={{
|
||||
textAlign : "center",
|
||||
marginBottom : 10,
|
||||
fontSize: 19
|
||||
fontSize: 19,
|
||||
pointerEvents: "none"
|
||||
}}>{getMonthName(index)}</p>
|
||||
<div className={"Days"}>
|
||||
<div className={"Days"} style={{
|
||||
pointerEvents: "none"
|
||||
}}>
|
||||
{weekdays.map((weekday) => (
|
||||
<p key={weekday}>{weekday}</p>
|
||||
<p key={weekday} style={{
|
||||
pointerEvents: "none"
|
||||
}}>{weekday}</p>
|
||||
))}
|
||||
{freeSpaces(index)}
|
||||
{monthResult.map((date) => (
|
||||
<p key={date}>{date}</p>
|
||||
<p key={date} style={{
|
||||
pointerEvents: "none"
|
||||
}}>{date}</p>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
@@ -122,7 +133,9 @@ function freeSpaces(index)
|
||||
{
|
||||
let arrayTest = []
|
||||
for (let i = 0; i < calculatedDay[index]; i++) {
|
||||
arrayTest.push(<p></p>)
|
||||
arrayTest.push(<p style={{
|
||||
pointerEvents: "none"
|
||||
}}></p>)
|
||||
}
|
||||
return arrayTest
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user