selected date is not flagged when using a different calendar of dayjs
Javid-Izadfar opened this issue · comments
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.
I'd open a MR if you guys also think this is the issue