ijavad805 / ijavad805/react-datepicker

Error: Invalid Jalali year -100721 on NextJS

Open
#12 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
38
Forks
6
PR merge metrics
No merged PRs in 30d

Description

I got this error when app is mounted

![Capture](https://user-images.githubusercontent.com/74317517/236411295-309d405b-0887-4f74-8162-ce78f5cffb51.PNG)

and this is my component:

```js

}
modeTheme={'light'}
theme={'blue'}
closeWhenSelectADay={true} // boolean
defaultValue={moment()}
value={dateInput}
onChange={(val) => setDateInput(val)}
/>
```

Are you have any suggestion for solve the problem? what i to do?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the mounted Datepicker with the component props shown in the issue, especially defaultValue={moment()} and value={dateInput}. Trace the Jalali date conversion that produces year -100721; done means identifying the input or conversion causing the invalid year and adding a fix or a clear reproduction-based report.

Written by the indexing model from the issue text.

Assessment

Tech stack
next.js, react, typescript
Domain
frontend, localization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.