Skip to content

feat(ui5-date/time*): introduce translatable fallback placeholder #11739

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

hinzzx
Copy link
Contributor

@hinzzx hinzzx commented Jun 16, 2025

Previously, when no placeholder was provided in our Date/Time components, the default placeholder simply displayed the formatPattern string (e.g., MMM d, y, dd/MM/yyyy - dd/MM/yyyy).

With this change, if no placeholder is set, the default placeholder now displays a translatable example value in the correct formatPattern/displayFormat— using the last value of the relevant period (such as the last day of the year, last hour of the day, etc.).

Examples:

e.g. 23:59:59
e.g. Dec 31, 2025

Before

2025-06-16_16-43-14

After

2025-06-16_16-44-17

@hinzzx hinzzx marked this pull request as ready for review June 17, 2025 08:05
}

// translatable placeholder – for example "e.g. 2025-12-31"
return `${DatePicker.i18nBundle.getText(DATETIME_COMPONENTS_PLACEHOLDER_PREFIX)} ${this._lastDayOfTheYear}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you try using this.getFormat().getPlaceholderText() ?

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.

2 participants