build(deps): update src/components/Datepicker/DateRangePicker/index.js, src/components/Datepicker/index.js and src/index.scss update yarn.lock
parent
65e49067c9
commit
a9b3ecbe89
3 changed files with 45 additions and 0 deletions
@ -0,0 +1,38 @@ |
||||
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 CalenderList = () => { |
||||
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 CalenderList; |
Loading…
Reference in new issue