jquery - jquery 中的完整日历示例

标签 jquery asp.net-mvc calendar fullcalendar

我正在尝试将 jquery 完整日历 ( http://arshaw.com/fullcalendar/ ) 集成到我的 asp.net mvc 应用程序中。

我需要使用这个完整的日历来添加/编辑/删除/显示使用 SQL Server 数据库作为后端的事件。

有人有示例代码来使用此完整日历实现添加/编辑/删除事件吗?

最佳答案

function createCalendar() {

    var d = new Date();
    var y = d.getFullYear();
    var m = d.getMonth();

    $('#calendar').fullCalendar({
                editable : false,
                events : 'urltoevents'
                aspectRatio : 1.5,
                header : {
                    left : false,
                    center : 'title',
                    right : 'prev,next today'
                },
                eventClick : function(event) {
                    handle the click event.
                }
            });

};

function removeEvent(id){
    $('#calendar').fullCalendar('removeEvents', id);
}

function updateEvent(id, title){
    var event = $('#calendar').fullCalendar('clientEvents', id);
    event.title = title;
    $('#calendar').fullCalendar('updateEvent', event);
}

关于jquery - jquery 中的完整日历示例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1538071/

相关文章:

java - 通过 Jquery 从 Datebox 中清除日期

javascript - 重新加载页面后如何在AJAX成功函数中设置值?

c# - HTML 到格式化文本 C#

asp.net-mvc - asp.net mvc - 需要为当前请求存储一些数据

android - 如何从我的应用程序打开谷歌日历应用程序?

javascript - GetElementByID 与 textarea

javascript - 使用 JS 定位类名迭代

asp.net - 哪个性能最好 : Classic ASP, ASP.NET WebForms 或 ASP.NET MVC?

android - 从android中的另一个应用程序打开默认日历应用程序

java - 为什么 LocalDate 值没有设置在今天的日期