themouette / jquery-week-calendar

A weekly calendar plugin based on jquery and jquery-ui
http://groups.google.com/group/jquery-week-calendar
720 stars 253 forks source link

Issue in rendering an event : data from database #186

Open rrg1248 opened 10 years ago

rrg1248 commented 10 years ago

Hello everyone, I have an issue in rendering an event on calendar. Event data is coming from database and I am converting it in the below given format:

events : [ { "id":appointment_id, "start": new Date(sYear, sMonth, sDay, STHr, STMin), "end": new Date(eYear, eMonth, eDay, ETHr, ETMin), "title":Title }

             ]

Can anyone help me solve this issue.

Thanks in advance

teklakct commented 10 years ago

@rrg1248 wher's is problem ?

ehrenberg commented 8 years ago

Hey everyone,

        data : function(start, end, callback) {
            var eventdata = {};
            $.ajax({
                url : "ajax.php",
                type : "POST",
                dataType: 'json',
                data : {
                    type : "getEntrys",
                    type2 : "delivery"
                },
                success : function(data, textStatus, jqXHR) {
                    eventdata = data;
                }
            });
            callback(eventdata);
        }

I'm trying the Same. The Testdata from ajax.php looks like this:

events : [{"id":1,"start":1473321600,"end":1473332400,"title":"Lunch with Mike"},{"id":2,"start":1473336000,"end":1473339600,"title":"Test2"}]

But i got an Error like this:

Uncaught TypeError: Cannot read property 'length' of undefined

Thanks for Help. perhaps it will help you too @rrg1248