Skip to content

Commit

Permalink
fix: convert laravel locale to fullcalendar compatible locale
Browse files Browse the repository at this point in the history
  • Loading branch information
saade committed Jun 27, 2022
1 parent 5869d1f commit 4da9a3a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions resources/views/fullcalendar.blade.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
@php($locale = strtolower(str_replace('_', '-', $this->getConfig()['locale'])))

<x-filament::widget>
<x-filament::card>
<div wire:ignore x-data="" x-init='document.addEventListener("DOMContentLoaded", () => {
const calendar = new FullCalendar.Calendar($el, Object.assign(
@json($this->getConfig()),
{
locale: "{{ $locale }}",
events: @json($events),
eventClick: ({ event, jsEvent }) => {
if(event.url) {
Expand Down

0 comments on commit 4da9a3a

Please sign in to comment.