Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue in rendering an event : data from database #186

Open
rrg1248 opened this issue Aug 11, 2014 · 2 comments
Open

Issue in rendering an event : data from database #186

rrg1248 opened this issue Aug 11, 2014 · 2 comments

Comments

@rrg1248
Copy link

rrg1248 commented Aug 11, 2014

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
Copy link

@rrg1248 wher's is problem ?

@ehrenberg
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants