Giter Club home page Giter Club logo

Comments (17)

Herz3h avatar Herz3h commented on July 17, 2024 13

Is there only one slot ?

from fullcalendar-vue.

rangermeier avatar rangermeier commented on July 17, 2024 12

It would be neat if one could use slots to render events.

I really would love to be able to do something like this:

<FullCalendar
  :events="events"
>
<template v-slot:event="{event, view}">
   <div class="my-calendar-event">{{ event.title }}</div>
</template>
</FullCalendar>

from fullcalendar-vue.

arshaw avatar arshaw commented on July 17, 2024 12

scoped slots are implemented in the latest v5 beta

changelog: https://fullcalendar.io/docs/v5/upgrading-from-v4#vue-connector
example code: https://github.com/fullcalendar/fullcalendar-example-projects/blob/v5/vue/src/DemoApp.vue#L13

they can be used for any of the new *Content settings, not just for events.

from fullcalendar-vue.

arshaw avatar arshaw commented on July 17, 2024 6

If you're curious to know, this will be included in v5 (currently in-development)
blog post: https://fullcalendar.io/blog/2020/02/changes-in-the-upcoming-v5

from fullcalendar-vue.

arshaw avatar arshaw commented on July 17, 2024 4

This has officially been release in v5: https://fullcalendar.io/blog/2020/06/v5-official

@AbrahamBrookes I moved your report to a new ticket: #105

from fullcalendar-vue.

brurubio avatar brurubio commented on July 17, 2024 2

Events Slots will be so helpful, exactly what I need. Do you have an idea when the v5 will be released?

from fullcalendar-vue.

matteopolati avatar matteopolati commented on July 17, 2024 1

Nothing new? Is support planned for this feature?
It would be useful to have the possibility to specify slots for header or footer calendar.

Thanks!

from fullcalendar-vue.

SergkeiM avatar SergkeiM commented on July 17, 2024

Would be very nice having slot inside event, currently manually adding/removing Vue Component in a very dirty solution. in eventRender and eventDestroy

from fullcalendar-vue.

ssyberg avatar ssyberg commented on July 17, 2024

scoped slots are implemented in the latest v5 beta

changelog: https://fullcalendar.io/docs/v5/upgrading-from-v4#vue-connector
example code: https://github.com/fullcalendar/fullcalendar-example-projects/blob/v5/vue/src/DemoApp.vue#L13

they can be used for any of the new *Content settings, not just for events.

the example code link appears to be broken

from fullcalendar-vue.

arshaw avatar arshaw commented on July 17, 2024

sorry. moved to master: https://github.com/fullcalendar/fullcalendar-example-projects/blob/master/vue/src/DemoApp.vue

from fullcalendar-vue.

ssyberg avatar ssyberg commented on July 17, 2024

sorry. moved to master: https://github.com/fullcalendar/fullcalendar-example-projects/blob/master/vue/src/DemoApp.vue

Thanks!

I noticed in the changelog that slots are available "with any of the *Content options in the API." Are these listen anywhere? I've tried searching through the API a bit but have only found eventContent. Is there one for toolbar?

from fullcalendar-vue.

AbrahamBrookes avatar AbrahamBrookes commented on July 17, 2024

It seems that using the new slot feature breaks reference to my root vue app? I have a component that sits inside the eventContent slot, and I can no longer access my root vue instance (in particular, my vuex store) from that component:


		<full-calendar 
			:options="calOptions"
		>
			<template v-slot:eventContent="event" >
				<planner-period
					:event="event"
				></planner-period>
			</template>

		</full-calendar>

Inside the planner-period component when I try to access my store data using this.$store.state I get this.$store is undefined. Is the calendar creating its own entirely new vue app?

from fullcalendar-vue.

arshaw avatar arshaw commented on July 17, 2024

@ssyberg , if you browse the docs in the "table of content" view: https://fullcalendar.io/docs#toc

...you'll be able to text-search for "Content" and you'll see

from fullcalendar-vue.

alex-maereanu avatar alex-maereanu commented on July 17, 2024

Yea.. not clear.

from fullcalendar-vue.

OleksiyyRiabiy avatar OleksiyyRiabiy commented on July 17, 2024

Guys, when I use scoped slots to customize an event the Calendar slows down. For example, changing the view is taking about 5 sec as well as moreLinkClick function or other actions with the Calendar. (Without slots the delay gets down to about 0.5 sec) Can you please check this out?

from fullcalendar-vue.

keygun-development avatar keygun-development commented on July 17, 2024

I'm missing a slot for the full event to be changeable (not only the content). I'm trying to open a custom made modal, but the only slot to be used is the eventContent slot.

I'd like to see a new slot within the <FullCalendar />

Something like:

    <FullCalendar>
        <template #event="arg">
            <div class="flex w-full" :id="arg.event.id" @click="openModal(arg.event.id)">
                <p class="font-bold">
                    {{ arg.timeText }}
                </p>
                <p class="ml-2">
                    {{ arg.event.title }}
                </p>
            </div>
        </template>
    </FullCalendar>

from fullcalendar-vue.

MohamedHana avatar MohamedHana commented on July 17, 2024

sorry. moved to master: https://github.com/fullcalendar/fullcalendar-example-projects/blob/master/vue/src/DemoApp.vue

Thanks!

I noticed in the changelog that slots are available "with any of the *Content options in the API." Are these listen anywhere? I've tried searching through the API a bit but have only found eventContent. Is there one for toolbar?

Working link: https://github.com/fullcalendar/fullcalendar-examples/blob/v5/vue2/src/DemoApp.vue

from fullcalendar-vue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.