wojtekmaj/react-daterange-picker

(Q) My calendar starts on MON instead of SUN

cindy-choi opened this issue ยท 2 comments

Hi! here is my code and capture.
it starts on Monday instead of Sunday.
I want to make it starts on Sunday, but I cannot find why and how to fix it ๐Ÿ˜‚
Is there any props for this?

image

import DatePicker from 'react-date-picker';
import { RiArrowLeftSLine, RiArrowRightSLine } from "react-icons/ri";
import { BiCalendar } from "react-icons/bi";
import { IoIosClose } from "react-icons/io";

... 
return (
      <DatePicker
        onChange={onChange}
        value={new Date(date)}
        clearIcon={date ? <IoIosClose /> : null}
        calendarIcon={<BiCalendar />}
      />
);

yes there is a prop for this in react-calendar.
calendarType - Type of calendar that should be used. Can be "ISO 8601", "US", "Arabic", or "Hebrew". Setting to "US" or "Hebrew" will change the first day of the week to Sunday. Setting to "Arabic" will change the first day of the week to Saturday. Setting to "Arabic" or "Hebrew" will make weekends appear on Friday to Saturday

...or set locale to e.g. en-US :)