-
Notifications
You must be signed in to change notification settings - Fork 106
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
Let user overwrite all calendar options #777
Conversation
User will be able to overwrite all options mentioned here ( https://github.com/mdehoog/Semantic-UI-Calendar ) in an easier, more intuitive way by extending UI persistence like that: class UI extends \atk4\ui\Persistence\UI { public $date_format = 'd.m.Y'; public $time_format = 'H:i'; public $datetime_format = 'd.m.Y H:i:s'; // 'D, d M Y H:i:s O'; /** * Calendar input first day of week. * 0 = sunday;. * * @var int */ public $firstDayOfWeek = 1; public $currency = '€'; public $yes = 'Ja'; public $no = 'Nein'; public $options = array('today' => true, 'monthFirst' => false, 'touchReadonly' => true, 'startMode' => year, 'ampm' => false, 'formatInput' => true, 'multiMonth' => 1, 'text' => array( 'days' => ['S', 'M', 'D', 'M', 'D', 'F', 'S'], 'months' => ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'], 'monthsShort' => ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], 'today' => 'Heute', 'now' => 'Jetzt', 'am' => 'AM', 'pm' => 'PM') ); }
Does Calendar FormField still rely on https://github.com/mdehoog/Semantic-UI-Calendar ? Fomantic-UI did great improvements to that calendar and, if not so already, we should use it. |
I think so. I am not 100% sure though since I use the latest stable version only. Anyway, if the new Fomantic-UI uses a similiar way to customize various things it may be even better to have it implemented for easier (future) usage with more backwards-compatibility imho. One would just need to change the options-array then as soon as Fomantic-UI is being used. Edit: |
@FabulousGee - UI is now using Fomantic Calendar module. So the right options can be found here: https://fomantic-ui.com/modules/calendar.html#/settings. |
Changed it according to your suggestion. |
Codecov Report
@@ Coverage Diff @@
## develop #777 +/- ##
==========================================
Coverage ? 71.18%
Complexity ? 2246
==========================================
Files ? 119
Lines ? 5328
Branches ? 0
==========================================
Hits ? 3793
Misses ? 1535
Partials ? 0
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good now, thanks for PR!
User will be able to overwrite all options mentioned here ( https://github.com/mdehoog/Semantic-UI-Calendar ) in an easier, more intuitive way by extending UI persistence like that: