Skip to content

react dates doesn't show correct jalali dates #2046

@mahyarfrd70

Description

@mahyarfrd70

hello guys,
I used react-dates in my project, I want to have both Jalali and milady date picker in my project. but it seems that react-dates works not much well when I wanna use Jalali. I read issues and I found that this problem was asked but I couldn't find the right answer for it, can anyone help me to solve this problem?

problem :

when I render Jalali dates with renderDayContents method as below:
function renderDayText(day: any): ReactElement { return <>{jMoment(day).format('jD')}</> }
I expected react-dates render dates of the month from 1st but react-date rendered dates of the month from the 10th day of the previous month while I was in the current month.

I'll put a picture of this problem to help

Screen Shot 2020-09-22 at 4 02 23 PM

but wanna each day put under own month
thanks for your help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions