jquense / react-big-calendar

gcal/outlook like calendar component
http://jquense.github.io/react-big-calendar/examples/index.html
MIT License
7.84k stars 2.23k forks source link

How to set start of month and end of month when using date-fns localizer? #2169

Open vahidimani opened 2 years ago

vahidimani commented 2 years ago

Clear and concise description of the problem

How to set start of month and end of month when using date-fns localizer? I tried to use date-fns to localize calendar to "fa-IR" and calendar system to jalali, but calendar system is still gregorian! So I want to set first day and last day of month to show proper calendar base on jalali months days.

Suggested solution

No idea

Alternative

No response

Additional context

No response

Validations

Would you like to open a PR for this feature?

cutterbl commented 2 years ago

Not positive on this, but fairly sure you would need to use either the moment of Luxon localizers for this functionality. The moment localizer (I think) implies this from the 'locale' you set, whereas the Luxon localizer takes an argument. See the localizer documentation for more information.

alirezaaminii commented 2 years ago

@vahidimani Hi Vahid Did you find a way to customize your calendar with Jalali system?

cutterbl commented 2 years ago

@alirezaaminii Not sure if @vahidimani figured this out, but I did give a possible answer to Jalali calendar in a StackOverflow answer. At least a good place to get started, maybe.

vahidimani commented 2 years ago

@vahidimani Hi Vahid Did you find a way to customize your calendar with Jalali system?

Check this out : https://github.com/sepehrooo/shamsi-jalali-react-big-calendar