Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selected date is not flagged when using a different calendar of dayjs #18

Open
Javid-Izadfar opened this issue Jun 19, 2021 · 1 comment

Comments

@Javid-Izadfar
Copy link
Member

I've imported dayjs right from @alibaba-aero/vue-calendar and used it with jalali calendar.

the issue I'm facing is, when I fill selections array with a jalali date (like '1400/03/29'), I get selected: false prop on DayView component.

I think the issue is:
When finding the month index in calendar.vue, a simple YYYY/MM/DD date string would break everything. at line 156 there is a different instance of dayjs with a different calendar (gregorian calendar).

Transforming my jalali date string to equivalent gregorian one was useless because then at month.vue I wouldn't be able to check if it's selected or not.

what I suggest is to format each item at line 156 to make sure keys match.

@Javid-Izadfar Javid-Izadfar changed the title selected date is nt flagged when using a different calendar of dayjs selected date is not flagged when using a different calendar of dayjs Jun 19, 2021
@Javid-Izadfar
Copy link
Member Author

I'd open a MR if you guys also think this is the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant