?
avatar pixxelfactory
pixxelfactory
10 Aug 2018

Is your feature request related to a problem? Please describe.

At the moment there is no option in the xml-definition of the calendar to set another day than sunday as first-day of week. It would be nice if we can set the day inside the form-xml

Describe the solution you'd like

Able to freely set the first day of week in the xml, like so for instance:
<field type="calendar" weekstart="monday" name="....

Additional context

avatar pixxelfactory pixxelfactory - open - 10 Aug 2018
avatar joomla-cms-bot joomla-cms-bot - change - 10 Aug 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 10 Aug 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 10 Aug 2018
Category JavaScript
avatar brianteeman
brianteeman - comment - 10 Aug 2018

I "think" it can be set in the language xml

avatar franz-wohlkoenig franz-wohlkoenig - change - 10 Aug 2018
Status New Discussion
avatar infograf768
infograf768 - comment - 10 Aug 2018

It is set in the language xml
<firstDay>0</firstDay> is Sunday for en-GB.
<firstDay>1</firstDay> is Monday for French fr-FR

We have no way in core to modify this by an override.

avatar pixxelfactory
pixxelfactory - comment - 10 Aug 2018

Hmm... ok, i guess we'll stick with the locale-version (our usage would have been to set the layout for a module/component independent of language or website ecc., since we have different administrators who speak different languages, and we want it to be consistent throughout without having to configure each language (often we have sites with 8-10 locales), but i guess the simplest solution would be to write to the locale.xml the same value for all languages).
Thanks anyways!

avatar pixxelfactory pixxelfactory - change - 10 Aug 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-08-10 09:48:08
Closed_By pixxelfactory
avatar pixxelfactory pixxelfactory - close - 10 Aug 2018
avatar infograf768
infograf768 - comment - 10 Aug 2018

In fact you can override...
code is in a Layout
/layouts/joomla/form/field/calendar.php

data-firstday="<?php echo JFactory::getLanguage()->getFirstDay(); ?>"

So I guess you can override that layout in your template
templates/nameoftemplate/html/layouts/joomla/form/field/calendar.php

Add a Comment

Login with GitHub to post a comment