Skip to content

DatePicker: focusable DatePickerTrigger Button on disabled=true Datepicker #13726

@jheidrich-gip

Description

@jheidrich-gip

Describe the bug

If I assign the attribute disabled="true" to a datePicker element with showIcon="true", the datePickerTrigger button is disabled via a style, but can still be focussed via keyboard and opened (the datepicker overlay will be displayed at the end of the document).

Reproducer

Reproduction (Tested with Version 14.0.12):

  1. Set the datepicker button variant to disabled=true <p:datePicker id="button" value="#{calendarView.date7}" showIcon="true" showOnFocus="false" disabled="true" />
  2. Use the keyboard to navigate to the disabled DatepickerButton
  3. press Enter to open the overlay
  4. Scroll to the bottom of the page, where the overlay is displayed:

Image

Expected behavior

If I set the DatePicker to disabled, the tabindex on the datePickerTriggerButton should be set to -1.

PrimeFaces edition

None

PrimeFaces version

14.0.12

Theme

No response

JSF implementation

Mojarra

JSF version

4.0

Java version

17.0.9

Browser(s)

Chrome, Firefox

Metadata

Metadata

Assignees

Labels

🐞 defectBug...Something isn't working

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions