如何使日历事件文本在单击时可编辑?
我正在尝试实现这个日历插件
http://jsfiddle.net/minusplus/7a7gG/2/< /a>
我不知道如何使日历事件文本在单击时可编辑。
浏览插件文档,我找不到方法调用以编辑事件文本。展示如何设置文本的唯一示例是在初始化时使用 title
指示器(在下面将其设置为 “与 Mike 共进午餐”
):
var eventData = {
events : [
{"id":1,
"start": new Date(year, month, day, 12),
"end": new Date(year, month, day, 13, 35),
"title":"Lunch with Mike"},
]
};
I'm trying to implement this calendar plugin
http://jsfiddle.net/minusplus/7a7gG/2/
What I can't figure out is how to make the calendar event text editable when it is clicked.
Looking through the documentation for the plugin, I can't find a method to call to edit the event text. The only example that shows how to set the text is upon initialization using a title
indicator (to set it below to "Lunch with Mike"
):
var eventData = {
events : [
{"id":1,
"start": new Date(year, month, day, 12),
"end": new Date(year, month, day, 13, 35),
"title":"Lunch with Mike"},
]
};
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用事件
eventClick
您需要编辑数据以存储所需的 eventData.events.title 的任何值,然后再次渲染它,$(”#calendar”).weekCalendar( ”today”);
我从未使用过这个插件,但根据我阅读文档的方式,这看起来是你需要做的。
Using the event
eventClick
you need to edit the data to store whatever value for the eventData.events.title you want, and then render it again,$(”#calendar”).weekCalendar(”today”);
I have never used this plugin, but this is what it looks like you need to do based on how I read the documentation.