Did is what I did so far
npm i flatpickr --save- Add
@import "~flatpickr/dist/flatpickr.css";to the app.scss - index.blade.php
@section('content')
<div class="form-group">
<label for="loaned">Loaned</label>
<input type="date" class="form-control" name="loaned" id="loaned">
</div>
@endsection
@section('scripts')
<script>
flatpickr('#loaned')
</script>
@endsection
I get an error, "flatpickr is not defined". I read the documentation but it, I don't know what to do with this part:
// commonjs
const flatpickr = require("flatpickr");
// es modules are recommended, if available, especially for typescript
import flatpickr from "flatpickr";