Documentation
Kitchen Sink documentation of style: 'Delos' of skin: 'ILIAS'
Month
Description
- Purpose
- The Month Button enables to select a specific month to fire some action (probably a change of view).
- Composition
- The Month Button is composed of a Button showing the default month directly (probably the month currently rendered by some view). A dropdown contains an interface enabling the selection of a month from the future or the past.
- Effect
- Selecting a month from the dropdown directly fires the according action (e.g. switching the view to the selected month). Technically this is currently a Javascript event being fired.
- Context
- Marginal Grid Calendar
Rules
- Interaction
- Selecting a month from the dropdown MUST directly fire the according action.
Example 1: Base
<?php declare(strict_types=1); namespace ILIAS\UI\examples\Button\Month; function base() { global $DIC; $f = $DIC->ui()->factory(); $renderer = $DIC->ui()->renderer(); return $renderer->render($f->button()->month("02-2017")->withOnLoadCode(function ($id) { return "$(\"#$id\").on('il.ui.button.month.changed', function(el, id, month) { alert(\"Clicked: \" + id + ' with ' + month);});"; })); }
Relations
- Parents
- UIComponent
- Button