Skip to content

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

@Javid-Izadfar

Description

@Javid-Izadfar

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.

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