You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

38 lines
813 B

import React from "react";
import { Calendar } from "react-multi-date-picker";
import persian from "react-date-object/calendars/persian";
import persian_fa from "react-date-object/locales/persian_fa";
const weekDays = [
"شنبه",
"یکشنبه",
"دوشنبه",
"سشنبه",
"چهارشنبه",
"پنجشنبه",
"جمعه",
];
const Calender = () => {
return (
<div className="calender-list">
<Calendar
mapDays={({ date }) => {
let props = {};
let isWeekend = date.weekDay.index === 6;
if (isWeekend) props.className = "highlight highlight-red";
return props;
}}
weekDays={weekDays}
arrow={false}
calendar={persian}
locale={persian_fa}
/>
</div>
);
};
export default Calender;