shahabyazdi / react-multi-date-picker

a simple React datepicker component for working with gregorian, persian, arabic and indian calendars
https://shahabyazdi.github.io/react-multi-date-picker/
MIT License
766 stars 90 forks source link

Problem with Nepal Calendar #252

Closed ghost closed 7 months ago

ghost commented 8 months ago

Hi Shahab Yazdi, I hope this message finds you well. I am one of the developers working on openIMIS project, a platform used to manage health insurance data. As requested by Nepal I have added your calendar to our system to allow to use a different calendar. While Nepal calendar is not defined in the repo, based on docs I was able to create two files with needed settings, details here:

PR

However, I am facing an issue with the incorrect data conversion - date is about a year and a half off from its actual value. From what I understood if my months length is defined properly (in Nepal calendar there are 12 months, but they have varying length in each year) and epoch value computed using your instruction it should work properly. Do you have any idea what could be the problem?

Thank you in advance

Abhushit commented 7 months ago

I am having the same problem. Trying to create a Nepali calendar using indian locale and had problem with incorrect months length, and week days does not match the nepali date.

Thank you!

ghost commented 7 months ago

Closing the ticket - Calendar seems to work, I had to add something to the epoch value (which I cannot justify theoretically, but it works). I have a problem with picking current date, but it seems unrelated.