Skip to content

Conversation

@unazko
Copy link
Contributor

@unazko unazko commented Oct 28, 2025

Add input CSS part to DatePicker and TimePicker components to allow styling of the native input element using ::part(input) selector.

  • Add @csspart input documentation for both components
  • Forward part attribute to DateTimeInput in templates
  • Maintains consistency with ui5-input component API
  • Enables scoping-friendly styling without deep selectors

Add input CSS part to DatePicker and TimePicker components to allow
styling of the native input element using ::part(input) selector.

- Add @csspart input documentation for both components
- Forward part attribute to DateTimeInput in templates
- Maintains consistency with ui5-input component API
- Enables scoping-friendly styling without deep selectors

Enhanced accessibility and styling capabilities following
UI5 Web Components Definition of Done guidelines.
@unazko unazko changed the title feat(ui5-date-picker,ui5-time-picker): expose input CSS part for styling fix(ui5-date-picker): add input CSS part for styling Oct 28, 2025
* @constructor
* @extends DateComponentBase
* @public
* @csspart input - Used to style the native input element
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not native input element

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are going through an abstraction (ui5-input element), in order to style the native input element in this case, which is the final goal.
Here is what we've received with this csspart approach of documentation (end goal in mind first):

Pros:

  • Matches user intent - they want to style the input field
  • Consistent with how other CSS parts are documented (focus on what gets styled)
  • Simpler mental model for developers
  • Aligns with the Input component's own documentation: "Used to style the native input element"

Cons:

  • Slightly abstracts the forwarding mechanism

@ui5-webcomponents-bot
Copy link
Collaborator

@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview November 3, 2025 13:06 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants