Skip to content

How do I use the "goTo..." functions? #38

Answered by lrljoe
kedodrill asked this question in Q&A
Discussion options

You must be logged in to vote

So you can't do that I'm afraid! That's a limitation of Livewire itself.

What you need to do, is take:

<span>
  <span>
    {{ $startsAt->englishMonth }}
  </span>
  <x-button wire:click="goToPreviousMonth">
    {{ __('Previous Month') }}
  </x-button>
  <x-button wire:click="goToCurrentMonth">
    {{ __('Current Month') }}
  </x-button>
  <x-button wire:click="goToNextMonth">
    {{ __('Next Month') }}
  </x-button>
</span>

And put it into a Blade by itself, let's say you put it in

resources/views/before-calendar-view.blade.php

Then where you have

<livewire:my-calendar />

Instead you want:

<livewire:my-calendar before-calendar-view="before-calendar-view" />

This way, your blade is con…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kedodrill
Comment options

Answer selected by kedodrill
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants