0

///////////// 主人 ////////////////

$(document).ready(function() {

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

        $('#calendar').fullCalendar({
            header: {
                left: 'prev,next today',
                center: 'title',
                right: 'month,agendaWeek,agendaDay'
            },
        editable: true,

        events: [
                {
                    id: 1,
                    title: moo,
                    start: new Date(2013, m, 1)
                }, 

//////////// 変更 //////////////

<script>

        $(document).ready(function () {

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



            $('#calendar').fullCalendar({
                header: {
                    left: 'prev,next today',
                    center: 'title',
                    right: 'month,agendaWeek,agendaDay'
                },
                editable: true,
                events: "/FullCalendarAJAXHandler.ashx"
            });

        });

    </script>

助けて。私は何をすべきかわかりません。

http://arshaw.com/fullcalendar/

私のためのコード?解決します。どうすればいいのか、他の方法で書く方法がわかりません。

英語に堪能ではありません。皆様には大変感謝しております。

public class FullCalendarAJAXHandler : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            List<CarModel> carList = new List<CarModel>();           
            var date = new DateTime();

            carList.Add(new CarModel
            {
                id = 69,
                title ="test",
                start = new DateTime(2013,07,01),
                end = new DateTime(2013,07,02),
                allDays = false
            });

            context.Response.Write(new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(carList));
        }

        public bool IsReusable
        {
            get { return false; }
        }

        private class CarModel
        {
            public int id;
            public string title;
            public DateTime start;
            public DateTime end;
            public bool allDays;
        }


    }
4

1 に答える 1

0

このサンプルをダウンロードしてください。これは、asp.net http://code.google.com/p/fullcalendar-asp-net/で fullCalendar を使用する良い例です。

于 2013-09-03T11:11:18.753 に答える