Skip to content
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

[Feature Request] Litepicker set language #404

Open
derBoogie opened this issue Feb 22, 2023 · 3 comments
Open

[Feature Request] Litepicker set language #404

derBoogie opened this issue Feb 22, 2023 · 3 comments
Labels

Comments

@derBoogie
Copy link

The Litepicker is in English language by default.
To change the language, it's necessary to set the "lang" option on initialization:

Events2.js:

me.initializeDatePicker = function () {
	document.querySelectorAll('.addDatePicker').forEach($inputWithDatePicker => {
		new Litepicker({
			element: $inputWithDatePicker,
			format: me.dateFormat,
			singleMode: true,
			resetButton: true,
			lang: 'de-DE'
		});
	});
};
@sfroemkenjw
Copy link
Contributor

Hello @derBoogie

again `me.initializeDatePicker´?!?!

Can you please tell me which version you are using?

Bildschirm­foto 2023-02-23 um 09 52 23

The LitePicker is already in german in events2 8.1.5.

I'm closing that issue. Feel free to re-open that issue, if you have further information for us.

Stefan

@derBoogie
Copy link
Author

Hi @sfroemkenjw

the Litepicker looks different on my site:

Screenshot-Events2-Litepicker

And here is a screenshot of the installed Events2 Version (8.1.5) and the Events2.js file with me.initializeDatePicker:

Screenshot-Events2-8 1 5

TJ

@sfroemkenjw
Copy link
Contributor

Hello @derBoogie

now I can confirm your issue. You're using the extbase form to insert new events. I instead use the new EXT:form integration of events2 (configurable in TS constants) where another DatePicker will be used.

Just a note for the developer who will work on that:
We can not just apply a hard-coded ISO code to JS. Configure that value with TS:settings is also a bad idea. Maybe we can extract the ISO code from SiteConfiguration and make it available in a data attribute in Template/Layout.

Stefan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants