The datepicker works on my bootstrap folder. However, when I move everything into laravel, it does not work. I don’t really understand that how css
and js
work in laravel, so that is why I am here :).
/resources/sass/app.scss
//css
@import url('https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/css/bootstrap-datepicker.min.css');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css');
//js
@import url('https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js');
@import url('https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js');
@import url('https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/js/bootstrap-datepicker.min.js');
<!--DatePicker-->
<div class="col-md-4">
<h4 class="">Prefer Date</h3>
<form>
<div class="">
<!-- <label for="date" class="col-sm-1 col-form-label">Date</label> -->
<div class="">
<div class="input-group date" id="datepicker">
<input type="text" class="form-control">
<span class="input-group-append">
<span class="input-group-text bg-white">
<i class="fa fa-calendar"></i>
</span>
</span>
</div>
</div>
</div>
</form>
</div>
<script type="text/javascript">
$(function() {
$('#datepicker').datepicker();
});
</script>