Skip to content

DatePicker: Styling its width displays incorrectly #8216

@NikoGJ

Description

@NikoGJ

Describe the bug

Between PrimeVue 4.3.9 and 4.4.1, styling the width of DatePicker does not display the same anymore.

PrimeVue 4.3.9:

<DatePicker
          input-id="effective-date"
          style="width: 9em"
          v-model="effectiveDate"
          show-icon
          icon-display="input"
          date-format="dd.mm.yy"
          select-other-months
          show-button-bar
        />

Displays as:
Image

Since PrimeVue 4.4.1, using the same code, it displays different:
Image

I have to also style the nested input (using the input-style property) in order to display it back to normal:

<DatePicker
          input-id="effective-date"
          style="width: 9em"
--------------------------------------------
          :input-style="{
            width: '100%',
          }"
--------------------------------------------
          v-model="effectiveDate"
          show-icon
          icon-display="input"
          date-format="dd.mm.yy"
          select-other-months
          show-button-bar
        />

Is this a regression that is fixable or should we always specify the extra input-style property from now ?

Pull Request Link

No response

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

No response

Reproducer

https://stackblitz.com/edit/primevue-4-vite-issue-template

Environment

N/A

Vue version

3.5.22

PrimeVue version

4.4.1

Node version

No response

Browser(s)

No response

Steps to reproduce the behavior

See above

Expected behavior

See above

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Needs TriageIssue will be reviewed by Core Team and a relevant label will be added as soon as possible

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions