Skip to content

Commit

Permalink
Merge pull request #14 from saade/fix/localization
Browse files Browse the repository at this point in the history
fix: convert laravel locale to fullcalendar compatible locale
  • Loading branch information
saade authored Jun 27, 2022
2 parents 1951f90 + 4da9a3a commit 5fa9039
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 5fa9039

Please sign in to comment.