Skip to content

Commit

Permalink
Add turbo frame load support for datepicker plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
zoltanszogyenyi committed Mar 10, 2023
1 parent 1300733 commit 3c87950
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/plugins/datepicker.turbo.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ import Datepicker from 'flowbite-datepicker/Datepicker';
import DateRangePicker from 'flowbite-datepicker/DateRangePicker';
import Events from '../dom/events';

const events = new Events('turbo:load', [initDatepickers]);
events.init();
const turboLoadEvents = new Events('turbo:load', [initDatepickers]);
const turboFrameLoadEvents = new Events('turbo:frame-load', [initDatepickers]);

turboLoadEvents.init();
turboFrameLoadEvents.init();

export default {
Datepicker,
Expand Down

0 comments on commit 3c87950

Please sign in to comment.