1 | <?php |
||
25 | class DatePicker extends InputWidget |
||
26 | { |
||
27 | |||
28 | /** |
||
29 | * @var string the name of the jQuery plugin |
||
30 | */ |
||
31 | public $pluginName = 'datepicker'; |
||
32 | /** |
||
33 | * @var array default widget plugin options that user pluginOptions will be merged into |
||
34 | */ |
||
35 | public $defaultPluginOptions = ['format' => 'yyyy-mm-dd', 'todayBtn' => 'linked', 'clearBtn' => true, 'autoclose' => true, 'weekStart' => 1]; |
||
36 | /** |
||
37 | * @var array the HTML attributes for the input tag. |
||
38 | * @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered. |
||
39 | */ |
||
40 | public $options = ['class' => 'form-control input-small']; |
||
41 | /** |
||
42 | * @var string element id to use when calling the datepicker |
||
43 | */ |
||
44 | public $elementId = null; |
||
45 | |||
46 | /** |
||
47 | * Renders the color picker widget |
||
48 | */ |
||
49 | protected function renderWidget() |
||
56 | |||
57 | /** |
||
58 | * Prepare the input fields for the input |
||
59 | * |
||
60 | * @return void |
||
61 | */ |
||
62 | protected function prepareInput() |
||
73 | |||
74 | /** |
||
75 | * Registers the needed client assets |
||
76 | * |
||
77 | * @return void |
||
78 | */ |
||
79 | public function registerAssets() |
||
93 | |||
94 | } |
||
95 |