CroudTech / vue-fullcalendar

FullCalendar Wrapper for vue
MIT License
483 stars 100 forks source link

Add scheduler example #79

Closed BrockReece closed 6 years ago

BrockReece commented 7 years ago

Add a scheduler example to docs. Seems like quite a popular question #69, #73

BrockReece commented 7 years ago

I think something like this would work... maybe someone using the package can confirm?

Download their package through NPM and import it into your project

import 'fullcalendar-scheduler'

Then you can add the required options to the config prop in vue-full-calendar

<full-calendar :config="config" />
<script>
export default {
  data() {
    return {
      config: {
        defaultView: 'timelineMonth',
        events: [
          // events go here
        ],
        resources: [
          // resources go here
        ]
        // other options go here...
      },
    }
  },
}
</script>
BrockReece commented 7 years ago

Here is a full working example of the code above https://codesandbox.io/s/qlp8jvko3j

Does this work for everyone else?

jdriesen commented 7 years ago

Implemented in once of my test Apps, and works like a charm ! Thanks for your effort.

(during weekend, I'll test ALL features and params... will keep you informed.)

Kind regards & thanks again, Johnny

BrockReece commented 7 years ago

Perfect, thanks 👍 I'll add it to the docs when you are happy.

BrockReece commented 6 years ago

@jdriesen I have created a PR that links to this code sandbox. Let me know when you are happy and I will merge it in.

jdriesen commented 6 years ago

Ohhh... sorry ... my bad... I think we've a small misunderstanding here...

When I wrote... " I will do some tests during weekend", I was referring to MANUAL tests... (like implementing and using the parameters...)

I don't have ANY experience is JEST or whatever... so I hope you're not waiting for me on this...

Grtz, Johnny

jdriesen commented 6 years ago

I've just one remark (it's more like a question)

In calendar, Config and Events are seperate date props. In Schedular... the Events are part of the config prop...

Any particular reason for this 'difference' ? (Asking this just out of curiosity .. as mentioned before, I'm rather new to all this)

Grtz, Johnny

BrockReece commented 6 years ago

Oh no sorry, I wasn't waiting for any formal tests, just wondering if you found any issues with the sandbox before I add it to the readme.

Good question, there is no real reason other than me copying the scheduler docs which had the events as part of the config options, you can pass in the events like that or as a prop. I will change that now though as it may cause undue confusion and distract from the important config options.

Thanks for your help with this.