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

Calendar: Incorrect interface "CalendarContext" for Calendar component #5077

Closed
Nik-Str opened this issue Jan 12, 2024 · 1 comment
Closed
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Nik-Str
Copy link

Nik-Str commented Jan 12, 2024

Describe the bug

Framwork: PrimeVue (Unstyled and Tailwind)
Version: 3.46.0
Component: Calendar
TypeScript: true

// Current exported interface

export interface CalendarContext {
    date: string | Date | string[] | Date[] | undefined | null;
    today: boolean;
    otherMonth: boolean;
    selected: boolean;
    disabled: boolean;
    month: CalendarMonthOptions;
    monthIndex: number;
    year: CalendarYearOptions;
}

// Type that is shown if console.log context

type ContextExample = {
  date: {
    day: number
    month: number
    year: number
    otherMonth: boolean
    selectable: boolean
    today: boolean
  }
  disabled: boolean
  selected: boolean
}

Reproducer

PrimeVue version

3.46.0

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

No need to reproduce, just check the export and compare to calendar "dayLabel" prop in the Lara example given:
https://tailwind.primevue.org/calendar/

Reference:
text-primary-500 dark:text-primary-400":e.date.today

Expected behavior

No response

@Nik-Str Nik-Str added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 12, 2024
@mertsincan
Copy link
Member

Thanks a lot, @Nik-Str! We'll check it before the next version is released.

@mertsincan mertsincan added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jan 15, 2024
@mertsincan mertsincan added this to the 3.47.0 milestone Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

3 participants