SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Error in Null

  1. #1
    SitePoint Addict
    Join Date
    Jun 2008
    Posts
    205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Error in Null

    Code:
    function CP_addDisabledDates(start, end){
            if(arguments.length==1){
                    end=start;
            }
            if(start==null && end==null){return;}
            if(this.disabledDatesExpression!=""){
                    this.disabledDatesExpression+= "||";
            }
            if(start!=null){
                    start = parseDate(start);
                    start=""+start.getFullYear()+LZ(start.getMonth()+1)+LZ(start.getDate());
            }
            if(end!=null){
                    end=parseDate(end);
                    end=""+end.getFullYear()+LZ(end.getMonth()+1)+LZ(end.getDate());
            }
            if(start==null){
                    this.disabledDatesExpression+="(ds<="+end+")";
            }
            else if(end  ==null){
                    this.disabledDatesExpression+="(ds>="+start+")";
            }
            else{
                    this.disabledDatesExpression+="(ds>="+start+"&&ds<="+end+")";
            }
    }
    I am getting an error as

    NULL is null or not an object

  2. #2
    SitePoint Wizard gRoberts's Avatar
    Join Date
    Oct 2004
    Location
    Birtley, UK
    Posts
    2,439
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The attributes being passed are both null by the looks of it. Can you confirm they are or not?



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •