Hi, i am using this widget
http://demos.krajee.com/widget-details/timepicker
How can i add a clear button to clear the time selected.
Hi, i am using this widget
http://demos.krajee.com/widget-details/timepicker
How can i add a clear button to clear the time selected.
Try this:
<?= $form->field($model, 'bday')->widget(DatePicker::className(), [
'pluginOptions' => [
'clearBtn' => true
]
]) ?>
Hi, thanks for your reply. But i am using kartik timepicker, not datepicker. I try the clearBtn anyway, but it doesnt add anything to the timepicker.
'pluginOptions' => [
'defaultTime' => false,
'minuteStep' => 5,
'clearBtn' => true,
],
In kartik timepicker documentation, there is no ‘clearBtn’ for pluginOptions.
Anyway, i did create my own button and use javascript to clear the time input value, but it is place below the timepicker.
echo Html::button('Padam waktu', ['class' => 'btn btn-default', 'id' => 'btn-padammasa']);
Is there anyway to put it on the same line as the timepicker?