Git Product home page Git Product logo

Comments (12)

ClickerMonkey avatar ClickerMonkey commented on August 21, 2024 1

When in doubt, the code is your friend!

There are a couple different ways to do what you want to do depending on precisely what you want to do.

  1. If you want all "location" inputs and displays hidden you do this:
Vue.use( DaySpanVuetify, {
  data: {
    supports: {
      location: false
    }
  }
});

(checkout this to see global event detail stuff)

  1. If you want "location" inputs on all create popover to be hidden...
Vue.use( DaySpanVuetify, {
  data: {
    defaults: {
      dsCalendarEventCreatePopover: {
        prompts: { location: false }
      }
    }
  }
});

(checkout this for defaults on that component that you can specify as props or override globally)

  1. If you want to do it for a specific popover you can use the props
<ds-calendar-event-create-popover
  :prompts="{location: false}"
></ds-calendar-event-create-popover>

(checkout here)

  1. If you wish to override the input for the location field there's a scoped slot for that:
<ds-calendar-event-create-popover>
<div slot="eventCreatePopoverLocation" slot-scope="{ details }">
  <v-text-field
    single-line hide-details solo flat full-width
    label="Where dis at?"
    v-model="details.location"
  ></v-text-field>
</div>
</ds-calendar-event-create-popover>

(checkout here)

  1. If you wish to add a new field:
<ds-calendar-event-create-popover>
<div slot="eventCreatePopoverBodyBottom" slot-scope="{ details, calendarEvent, calendar }">
   Here are some new fields!
</div>
</ds-calendar-event-create-popover>

(checkout here)

You can basically do that for all event details.

from dayspan-vuetify.

ClickerMonkey avatar ClickerMonkey commented on August 21, 2024 1

You have one object in slotData, so you can either extract the variables you want from slotData, or reference it like so:

<template slot="eventPopover" slot-scope="slotData">
            <v-btn @click.native="slotData.close">Close</v-btn>
</template>

OR

<template slot="eventPopover" slot-scope="{ close }">
            <v-btn @click.native="close">Close</v-btn>
</template>

See this for more info on scoped slots: https://vuejs.org/v2/guide/components-slots.html#Destructuring-slot-scope

from dayspan-vuetify.

developernaren avatar developernaren commented on August 21, 2024

I am getting a Missing required prop: "calendarEvent" in examples 3,4, and 5 that you gave. What should I pass on to "calendarEvent" prop in ds-calendar-event-create-popover component.

from dayspan-vuetify.

ClickerMonkey avatar ClickerMonkey commented on August 21, 2024

The above code samples are not complete pieces of code. I'm just showing where things are placed relatively speaking.

Checkout this file to see where the create popover is specified.

You add props and slots in there.

from dayspan-vuetify.

developernaren avatar developernaren commented on August 21, 2024

I am slowly getting a hang of this. Slots and scopes were new to me. So learning new things. I am stuck with this one.

dayspan schedule actions

<ds-schedule-actions
slot="activator"
v-bind="{$scopedSlots}"
v-on="$listeners"
:schedule="calendarEvent.schedule"
:calendar-event="calendarEvent"
:calendar="calendar">
<v-btn icon :style="styleButton">
<v-icon>more_vert</v-icon>
</v-btn>
</ds-schedule-actions>

I want to change the labels and actions of these buttons but in this particular part of the component, there are no named slots that I can replace. How can I add different labels and attach action to clicks on those options. Appreciate the help!

from dayspan-vuetify.

ClickerMonkey avatar ClickerMonkey commented on August 21, 2024

There is a slot named eventPopoverToolbarActions that you can override inside your <ds-calendar-event-popover> definition.

from dayspan-vuetify.

ClickerMonkey avatar ClickerMonkey commented on August 21, 2024

Found here:

https://github.com/ClickerMonkey/dayspan-vuetify/blob/master/src/components/CalendarEventPopover.vue#L31

from dayspan-vuetify.

developernaren avatar developernaren commented on August 21, 2024

It did not override anything. It just shows up next to the 'action dots'.

<template slot="eventPopover" slot-scope="slotData">
                <ds-calendar-event-popover
                        v-bind="slotData"
                        @finish="saveState"
                >


                    <template slot="eventPopoverToolbarActions" slot-scope="slotData">
                        hello world
                    </template>

                </ds-calendar-event-popover>
            </template>`

hello world
I used this code.

from dayspan-vuetify.

developernaren avatar developernaren commented on August 21, 2024

The schedule-actions is not inside the slot. is that the issue? They are two different tags.

from dayspan-vuetify.

developernaren avatar developernaren commented on August 21, 2024

I am having issue closing the detail pop up now.

<template slot="eventPopover" slot-scope="slotData">
            <v-btn @click.native="close">Close</v-btn>
</template>

I just want to close the eventPopover on clicking the button. But not sure how.

from dayspan-vuetify.

ClickerMonkey avatar ClickerMonkey commented on August 21, 2024

Also the eventPopoverToolbarActions problem above was fixed - I don't recall who (could've been you) pointed out an error in the HTML.

It's easy to loose track of the stuff you post in here since its a closed issue.

from dayspan-vuetify.

developernaren avatar developernaren commented on August 21, 2024

Yeah, that was me. I created a PR. Thanks for the quick response.

from dayspan-vuetify.

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.