admin管理员组文章数量:1287488
Plugin: /
I use a plugin to display my “custom_post_type” events.
- I have modified the “wp-fullcalendar.php” plugin file in several places to show the start and end time of the “custom_fields” event.
- I also edited the “inline.js” file in the “includes / js /” folder to make the calendar “editable” and “dragable”.
- But I CAN’T set the calendar to save the change to my “custom_post_type” event when I make a change by moving the event on the calendar.
I read the documentation for the JS plugin “calendar.io”, but I can’t insert the code into the already finished plugin “WP Fullcalendar”.
Will you help please? Thanks!!!
These are my edits to the plugin code
wp-fullcaleendar.php
/*
$post_date = substr($post->post_date, 0, 10);
$post_timestamp = strtotime($post->post_date);
*/
$post_date = substr($post->_EventStartDate, 0, 10);
$post_timestamp = strtotime($post->_EventStartDate);
$post_end_date = substr($post->_EventEndDate, 0, 10);
$post_end_timestamp = strtotime($post->_EventEndDate);
include/js/inline.js
editable: true,
droppable: true,
eventOverlap: true,
dayMaxEvents: true,
I need to save my appointment as soon as I drag its location on my calendar or when I change its duration. And I just can't do this. The source of the code, how to achieve this, is here:
Plugin: https://wordpress/plugins/wp-fullcalendar/
I use a plugin to display my “custom_post_type” events.
- I have modified the “wp-fullcalendar.php” plugin file in several places to show the start and end time of the “custom_fields” event.
- I also edited the “inline.js” file in the “includes / js /” folder to make the calendar “editable” and “dragable”.
- But I CAN’T set the calendar to save the change to my “custom_post_type” event when I make a change by moving the event on the calendar.
I read the documentation for the JS plugin “calendar.io”, but I can’t insert the code into the already finished plugin “WP Fullcalendar”.
Will you help please? Thanks!!!
These are my edits to the plugin code
wp-fullcaleendar.php
/*
$post_date = substr($post->post_date, 0, 10);
$post_timestamp = strtotime($post->post_date);
*/
$post_date = substr($post->_EventStartDate, 0, 10);
$post_timestamp = strtotime($post->_EventStartDate);
$post_end_date = substr($post->_EventEndDate, 0, 10);
$post_end_timestamp = strtotime($post->_EventEndDate);
include/js/inline.js
editable: true,
droppable: true,
eventOverlap: true,
dayMaxEvents: true,
I need to save my appointment as soon as I drag its location on my calendar or when I change its duration. And I just can't do this. The source of the code, how to achieve this, is here:
https://fullcalendar.io/docs/event-dragging-resizing
Share Improve this question asked Oct 12, 2021 at 17:25 Jičínský RumcajsJičínský Rumcajs 111 bronze badge 1- Third-party plugins are out of scope here, but in general I would advise you not to edit plugins. As soon as a security update is applied, your changes are overwritten. – vancoder Commented Oct 12, 2021 at 21:00
1 Answer
Reset to default 0I do agree with @vancoder's advice on editing plugins. That being said, I think you might need to do two things:
- Edit the JavaScript to use the eventDrop callback. https://fullcalendar.io/docs/eventDrop
- When the callback is fired, is there currently a method to update an event? I see in their documentation that you can allow users to create events, but I didn't see anything for editing. https://wp-events-plugin/documentation/user-event-guest-submissions/.
本文标签: calendarSave event change in WP Fullcalendar editabledraggable
版权声明:本文标题:calendar - Save event change in WP Fullcalendar: editable + draggable 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741269399a2368991.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论