openui5
openui5 copied to clipboard
sap.m.DatePicker hide or adapt calculation of the weeknumbers
OpenUI5 version: 1.101.0
Browser/version (+device/version): Chrome
Any other tested browsers/devices(OK/FAIL): OK
URL (minimal example if possible): https://sapui5.hana.ondemand.com/#/entity/sap.m.DatePicker/sample/sap.m.sample.DatePicker
User/password (if required and possible - do not post any confidential information here):
Steps to reproduce the problem:
- Go to url
- Open datepicker by clicking on the icon in the inputfield
- See weeknumbers at the left side of the datepicker popup
What is the expected result? The expectation here is that we want to be able to either hide or adapt the weeknumbers. It's not possible to hide it. Nor is it possible to change the calculation. There are two ways of calculating the weeknumbers, which is decided by the browser language. But if the browser language is different than the way the weeknumber is calculated, we see a 'wrong' weeknumber.
What happens instead? No customizing possible. Different browser languages see different weeknumbers.
@PieterAtFlexso can you please elaborate a bit on what you would expect from a feature that allows "adapt calculation of week numbers"?
We are currently discussing how to achieve something like this. Our current POV reg. the requirements is
- there are several different week numbering schemes that are used across the world (ISO-8601 being the most common one, but also Western Traditional, Middle Eastern, Western Traditional + split week, ...)
- the region is not the only factor that determines the week numbering schema, e.g. in business context a different numbering schema might be used (e.g. ISO 8601) than in every day life (maybe region based)
- Users working in a global company might prefer a common numbering schema for that company or they might prefer their regional scheme
- UI5's current default is based on CLDR information which is region based. Unfortunately, for the prominent logon language "en" this results in the (uncommon) US numbering scheme, not in ISO-8601 that most of our customers expect
- some app development teams raised the requirement to be able to enforce a certain numbering scheme in their scope (most of the time ISO-8601)
This made us think that a potential solution for all those scenarios would be to
- implement at least the most common numbering schemes
- ideally find a parameterisation that can support all of them (CLDR's abstraction of firstDayOfWeek and minDays (in first week) seems to be such a generalized parameterisation - only the US split week schema is not fully covered by this)
- use the locale-based (region-based) settings as default
- introduce a user setting that allows to override that default
- if user settings are shared with a backend (Fiori Launchpad in On Premise or Cloud), default the user settings from the backend (which in turn might default to some system default, esp. for the week numbering)
- enhance controls to allow a configuration of the week numbering scheme (defaulted it to the mentioned user config)
Obviously, changing any defaults might help some users (e.g. "en" users outside the US), but might also feel like a regression for others. Compensating this with additional customization capabilities for end users seemed like a good compromise to us.
Would such an approach fit your thoughts or do you see additional requirements?
Ah, and before you ask, no there's no schedule yet for such a feature. It's not even decided that it will happen in this or another way. Just wanted to use the chance to get some more feedback ;-)
Thank you for your comprehensive response. What we currently need is to enforce ISO-8601, without changing the region/locale/browser language/... of the user. So I was thinking, as you also suggested as potential solution, to have a parameter to set the numbering scheme. Which is what I mean with 'adapt calculation of week numbers'. If the most common numbering schemes are implemented, I don't really see the need of a fully custom calculation of week numbers. But an option to hide the week numbers, would also come in very handy. Because then you at least don't have 'wrong' week numbers visible in your webapplication anymore.