locked
invalid argument pipe string is not function for pipe datepipe ? RRS feed

  • Question

  • User696604810 posted

    i have error as below
    NbCalendarHeaderComponent.html:3 ERROR Error: InvalidPipeArgument: 'String is not a function' for pipe 'DatePipe'
    at invalidPipeArgumentError (common.js:6367)
    at DatePipe.transform (common.js:7594)
    at checkAndUpdatePureExpressionInline (core.js:43597)
    at checkAndUpdateNodeInline (core.js:44371)
    at checkAndUpdateNode (core.js:44306)
    at debugCheckAndUpdateNode (core.js:45328)
    at debugCheckRenderNodeFn (core.js:45306)
    at Object.eval [as updateRe


    this error display when i click to select date from date picker

    error display and nothing select

    fromDateClick() 
    { 
    
    this.model.startdate = ""; 
    
    } 
    
    <div class="col-sm"> 
    <label for="fromDate">FromDate</label> 
    <input [nbDatepicker]="datepicker1" #startdate="ngModel" [(ngModel)]="model.startdate" name="startdate" class="form-control" 
    (click)="fromDateClick()" type="text" readonly id="fromDate" placeholder="fromDate"> 
    <nb-datepicker #datepicker1></nb-datepicker> 
    </div> 
    
    model : any={ 
    startdate :'', 
    enddate:'' 
    
    }; 



    so how to solve problem please ?

    Saturday, May 16, 2020 8:34 PM

All replies

  • User303363814 posted

    startdate : ''

    doesn't look like a valid date to me.  Have you tried giving a valid startdate?

    Wednesday, May 20, 2020 11:28 PM