Actually, the event(TimeRangeSelectedJavaScript="openPatientType(start, end, column);) is called ,it is true but when  javascript function(openPatientType(start, end, column)) calls we cannot get parameters value in javascript code and not works split() on any variable.Function is described as below-
function openPatientType(start,end,column)
     { 
      var LunchDate = DayPilot.ds(start);          //here cannot get value of LunchDate , alert shows undefined
      var sepDate = LunchDate.split('T');           //and split() not working
      
        //Checking Past Appointment Start
        var splitDatePart = sepDate[0].split('-');
        var splitTimePart = sepDate[1].split(':');
        var monthPart = splitDatePart[1];
        if(monthPart=="08")
        {
        var monthpart_1=8;
        }
        else if(monthPart=="09")
        {
        var monthpart_1=9;
        }
        else
        {
        var monthpart_1 =parseInt(monthPart);
        }
        
        monthpart_1= monthpart_1 - 1;
        var clickedStartDate = new Date(splitDatePart[0],monthpart_1,splitDatePart[2],splitTimePart[0],splitTimePart[1],splitTimePart[2]);       
        var todayDate = new Date();       
        if(new Date(clickedStartDate) < new Date(todayDate)) {
            if (!confirm("You have selected a past time or date.  Do you wish to continue?")) {
                return false;
            } 
//           var conf_result = returnValue();
//           if (conf_result == 7) {
//                return false;
//            }
            hidSecurityOldAppt = document.getElementById("<%=hidSecurityOldAppt.ClientID%>");
            var hdnPrefrence = document.getElementById("<%=hdnPrefrence.ClientID%>");
            if (hidSecurityOldAppt.value != "1" ) 
                {
                    todayDate.setDate(todayDate.getDate() - hdnPrefrence.value);
                    if (new Date(clickedStartDate) <= new Date(todayDate)) {
                        alert("Appointments cannot be created "  + hdnPrefrence.value +  " days or more in the past.");
                        return false;
                    }
                    
            }
        }
        //Checking Past Appointment End
        
      //For Block OUt
      
      var hdBlockOutValue = document.getElementById("<%=hdBlockOutValue.ClientID%>");
      
      var hdAppAllowBlockOutOverride = document.getElementById("<%=hdAppAllowBlockOutOverride.ClientID%>");
  
      
      var dayColumn = column.split("-");
      var dayFitterId = dayColumn[1];
      var dayOffice = dayColumn[0];   
      var i,j;
    
      if(hdBlockOutValue.value.indexOf("$") > -1)
      {
        var strValues = hdBlockOutValue.value.split("$");
        for(i = 0;i<strValues.length;i++)
        {
            if(strValues[i] != null && strValues[i] != '')
            {
               var strRowValue = strValues[i].split("^");
               var strColumnField = strRowValue[0];
               var strOfficeNum = '';
               var strFitterId = '';             
               if(strColumnField.length > 0 && strColumnField != null)
               {
                    var strColumnValues = strColumnField.split("-");
                    strOfficeNum = strColumnValues[0];
                    strFitterId = strColumnValues[1];
               }               
               var vTemp = 0;
               var vTemp1 = 0;
               var strDateField = strRowValue[1].split("%");               
               var strStartDate = strDateField[0];               
               var strEndDate = strDateField[1];                           
               var dayStartDate = DayPilot.ds(start).replace('T',' ').replace('-','/');
               var dayEndDate = DayPilot.ds(end).replace('T',' ').replace('-','/');
               if(strOfficeNum != '')
               {
                    if(strOfficeNum == dayOffice)
                    {
                        vTemp = 1;
                    }
               }
               else
               {
                 vTemp = 1;
               }
               if(strFitterId != "")
               {
                    if(strFitterId == dayFitterId)
                    {
                        vTemp1 = 1;
                    }
               }
               else
               {
                    vTemp1 = 1;
               }
             
               if(new Date(dayStartDate) >= new Date(strStartDate) && new Date(dayEndDate) <= new Date(strEndDate) && parseInt(vTemp) == 1 && parseInt(vTemp1) == 1)
               {  
            
               if(hdAppAllowBlockOutOverride.value != "1")  
                    {          
                        makeAlert('Appointment','The selected time slot has been blocked out for this practitioner.\n Please choose a different practitioner or a different time.');
                        return false; 
                    }
                    else
                    {
                         var answer = confirm ("The selected time slot has been blocked out for this practitioner. Do you wish to continue?”")
                         if (!answer)
                          {
                             return false; 
                          }                      
                    }                            
               }         
            }
        }
      }
Please let us know How we can resolve this issue .