Open blunde opened 8 months ago
The documentation is clear, you just need extra code to enable in livewire 3
page.blade.php
<script data-navigate-once>
document.addEventListener('livewire:navigated', () => {
const Datepicker = document.getElementById('date');
if (!Datepicker) return;
new Datepicker(Datepicker, {
format: 'yyyy/mm/dd',
buttons: true, // not working
autohide: true,
title: 'This is a datepicker',
});
});
</script>
app.js
import Datepicker from 'flowbite-datepicker/Datepicker';
window.Datepicker = Datepicker;
Livewire.start()
How can I set options on a datepicker that is already initialized ?
Using Laravel 10, Livewire 3, npm