1 | <?php |
||
23 | class DateTimePicker extends InputWidget |
||
24 | { |
||
25 | /** |
||
26 | * @var string the language to use |
||
27 | */ |
||
28 | public $language; |
||
29 | /** |
||
30 | * @var array the options for the Bootstrap DatePicker plugin. |
||
31 | * Please refer to the Bootstrap DatePicker plugin Web page for possible options. |
||
32 | * @see http://bootstrap-datepicker.readthedocs.org/en/release/options.html |
||
33 | */ |
||
34 | public $clientOptions = []; |
||
35 | /** |
||
36 | * @var array the event handlers for the underlying Bootstrap Switch 3 input JS plugin. |
||
37 | * Please refer to the [DatePicker](http://bootstrap-datepicker.readthedocs.org/en/release/events.html) plugin |
||
38 | * Web page for possible events. |
||
39 | */ |
||
40 | public $clientEvents = []; |
||
41 | /** |
||
42 | * @var string the size of the input ('lg', 'md', 'sm', 'xs') |
||
43 | */ |
||
44 | public $size; |
||
45 | /** |
||
46 | * @var array HTML attributes to render on the container if its used as a component. |
||
47 | */ |
||
48 | public $containerOptions = []; |
||
49 | /** |
||
50 | * @var string the template to render the input. By default, renders as a component, you can render a simple |
||
51 | * input field without pickup and/or reset buttons by modifying the template to `{input}`. `{button}` must exist for |
||
52 | * a component type of datepicker. The following template is invalid `{input}{reset}` and will be treated as `{input}` |
||
53 | */ |
||
54 | public $template = "{input}{reset}{button}"; |
||
55 | /** |
||
56 | * @var string the icon to use on the reset button |
||
57 | */ |
||
58 | public $resetButtonIcon = 'glyphicon glyphicon-remove'; |
||
59 | /** |
||
60 | * @var string the icon to use on the pickup button. Defaults to `glyphicon-th`. Other uses are `glyphicon-time` and |
||
61 | * `glyphicon-calendar`. |
||
62 | */ |
||
63 | public $pickButtonIcon = 'glyphicon glyphicon-th'; |
||
64 | /** |
||
65 | * @var bool whether to render the input as an inline calendar |
||
66 | */ |
||
67 | public $inline = false; |
||
68 | |||
69 | /** |
||
70 | * @inheritdoc |
||
71 | */ |
||
72 | 5 | public function init() |
|
91 | |||
92 | /** |
||
93 | * @inheritdoc |
||
94 | */ |
||
95 | 4 | public function run() |
|
121 | |||
122 | /** |
||
123 | * Registers required script for the plugin to work as a DateTimePicker |
||
124 | */ |
||
125 | 4 | public function registerClientScript() |
|
167 | } |
||
168 |