Time Picker

Time picker provides an interface to easily set time values.

Introduction

Currently Materialize itself does not provide any time picking plugins.
To close the gap yii2-materializecss provides a widget which utilizes chingyawhao's clock picker for Materialize JS plugin.

To define your options simply set $clientOptions and $clientEvents.
Please see the official documentation for details on the available otions.


<?= \macgyer\yii2materializecss\widgetsorm\TimePicker::widget([
    'name' => 'timepicker_example',
    'options' => ['placeholder' => 'Select time'],
    'clientOptions' => [
        'twelvehour' => false
    ]
]); ?>

<input type="text" id="w0" class="clockpicker picker__input picker__input--active" name="timepicker_example" placeholder="Select time" tabindex="-1">

Rendered result

Please note:
As this is a JS plugin, the input will be further manipulated by the JS plugin.