We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Uncaught TypeError: Cannot read property 'promise' of null

Thread ID:

Created:

Updated:

Platform:

Replies:

128832 Feb 11,2017 04:08 PM Jun 13,2017 12:29 AM JavaScript 4
loading
Tags: ejSchedule
Jonas de Abreu Resenes
Asked On February 11, 2017 04:08 PM

Hi Guys,

I am having issues to save an appointment in the ejschedule.

References:

<meta name="viewport" charset="utf-8" content="width=device-width, initial-scale=1.0" />
    <link rel='nofollow' href="content/bootstrap.min.css" rel="stylesheet" />
    <link rel='nofollow' href="content/ejthemes/default-theme/ej.web.all.min.css" rel="stylesheet" />
    <link rel='nofollow' href="content/default.css" rel="stylesheet" />
    <link rel='nofollow' href="content/default-responsive.css" rel="stylesheet" />
    <link rel='nofollow' href="content/ejthemes/responsive-css/ej.responsive.css" rel="stylesheet" />
    <link rel='nofollow' href="content/ejthemes/responsive-css/ejgrid.responsive.css" rel="stylesheet" />
    <!-- Fix jQuery Reference  -->
    <script>if (typeof module === 'object') { window.module = module; module = undefined; }</script>
    <!--[if lt IE 9]>
    <script type="text/javascript" src="../scripts/jquery-1.11.3.min.js" ></script>
    <![endif]-->
    <!--[if gte IE 9]><!-->
    <script src="scripts/jquery-3.1.1.min.js"></script>
    <script src="scripts/jquery.easing.1.3.js"></script>
    <!--<![endif]-->
    <script src="scripts/jsrender.min.js"></script>
    <script src="scripts/ej.web.all.min.js" type="text/javascript"></script>
    <script src="scripts/properties.js" type="text/javascript"></script>
    <script src="scripts/jsondata.min.js"></script>
    <script src="scripts/jsonscheduledata.js" type="text/javascript"></script>
    <script src="scripts/jsonkanbandata.js"></script>
    <!-- Fix jQuery Reference  -->
    <script>if (window.module) module = window.module;</script>

Code:
  var scheduleObj = $("#schedule").data("ejSchedule");

 var StartDate = new Date(cur_StartTime);
                    var StartTime = new Date(cur_StartTime);
                    var EndTime = cur_EndTime;

                    var obj = {
                        Id: 108,
                        Subject: "Talk with Nature",
                        StartTime: StartTime,
                        EndTime: EndTime,
                        AllDay: $(e.target).hasClass("e-alldaycells") ? true : false,
                        Recurrence: false,
                        RecurrenceRule: null,
                        StartTimeZone: "UTC +00:00",
                        EndTimeZone: "UTC +00:00",
                        Promise: 1
                    };

                    // Appointment object saving to the schedule control
                    scheduleObj.saveAppointment(obj);

Error:

ej.web.all.min.js:10 Uncaught TypeError: Cannot read property 'promise' of nullsaveAppointment @ ej.web.all.min.js:10scheduleDrop @ index.html:257rowDrop @ index.html:146_trigger @ ej.web.all.min.js:10dragStop @ ej.web.all.min.js:10_trigger @ ej.web.all.min.js:10_dragStop @ ej.web.all.min.js:10e @ jquery-3.1.1.min.js:2dispatch @ jquery-3.1.1.min.js:3q.handle @ jquery-3.1.1.min.js:3

Jonas de Abreu Resenes
Replied On February 12, 2017 08:21 AM

I fixed the issue. You can close this thread

Karthigeyan Krishnamurthi [Syncfusion]
Replied On February 13, 2017 01:15 AM

Hi Jonas, 
 
Thank you for contacting Syncfusion support. 
 
We are happy to hear that your issue is resolved. 
 
Kindly let us know if you need further assistance. 
 
Regards, 
Karthigeyan 
 


Shanth
Replied On June 12, 2017 04:02 AM

Hi Jonas de Abreu Resenes,

Could you please let me know how you fixed the issue since I am facing the same issue.

Thanks in advance.

Karthigeyan Krishnamurthi [Syncfusion]
Replied On June 13, 2017 12:29 AM

Hi Shanth, 
 
Thanks for your update. 
 
We have checked the mentioned scenario with latest version and no script error occurs while saving appointment using saveAppointment. We have prepared the same as sample which can be viewed from the below link, kindly try the sample and if the issue persists, try to reproduce the error in a sample and revert it back to us. Or else you can share your code example/runnable sample (if possible) to proceed further.  
 
Regards, 
Karthigeyan 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;