CroudTech / vue-fullcalendar

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

how to enable eventResize ? #58

Closed maverickchangithub closed 7 years ago

maverickchangithub commented 7 years ago

hi Brock , me again.... sorry for this little stupid question :

i just cannot enable event resize (month view , week and day seems ok) , is there any condition i should write in the parent component?

in my parent component:

<full-calendar ref="calendar" :events="events" @event-selected="eventSelected" @day-click="dayClick" @event-resize="eventResize" @event-drop="eventDrop"></full-calendar>

and btw , if you can give me some advice to enable drop event from outside in vue way.

thanks a lot !!

BrockReece commented 7 years ago

Hi @maverickchangithub So this component should be editable by default. So if you resize an event (drag the bottom of an event) it should emit the event-resize event. It looks like you are listening to the event-resize event and it should be firing a method called eventResize in your parent component. Is it not firing this method?

Anything in the console to help us out here?

maverickchangithub commented 7 years ago

hi Brock , i tested , in week and day view , it fired the method ,works fine and could be resized .

But , in month view , when mouse hover on a event , the cursor does not change like it did in jquery mode. I think event resize in month view would be dragging left and right side of the event , which i could not do now.

And for the 2nd question , how to use drag and drop a event from outside to the calendar?

Thanks !

update: seems like the js did not push a class called 'is-resizable' , maybe not assign time to the event could resize in the month view?

BrockReece commented 7 years ago

I'm not sure why the month view would make a difference. Could you share some code of your old jquery based project and I will look at migrating it for you.

As I said in an earlier message, all this package does is wrap fullcalendar into a Vue component, so anything you are able to do in your jQuery version should work in this component.

maverickchangithub commented 7 years ago

you are 100% right . i found it should assign allDay to an event .....

Sorry ! My fault again.....

But , how to do dragging external event to calendar ? just likeTHIS

BrockReece commented 7 years ago

That looks quite nifty, I am guessing they are using this in their config.

Looks like you will need to build a jQuery ui draggable list of possible events too.

maverickchangithub commented 7 years ago

thanks Brock!

i googled a lot , there are still a few things not clear to me .

BrockReece commented 7 years ago

Hi @maverickchangithub

I am happy to help out but I am going to close this now though as there isn't actually an issue with this project.