I have used normal input field in Yii 2 to take a date. I haven't used model for input field. How can I use datepicker in that input field?
My code for input field is:
<div class="col-lg-4">
<label>From</label> <input type="text" id="datepicker" class="form- control" name="frominput" />
</div>
And now my JS code is:
<?php
$this->registerJs("
$( '#datepicker' ).datepicker();
");
?>
This doesn't show datepicker. How can I do this?