Q: How to save other details when id is set to true when button is clicked I'm unable to save the variables fine,status when the boolean variable isreturned is set to true on button click.
//api.js
 router.get('/return/:id?',(req,res)=>{
                    var id=req.params.id;
                    console.log(id);
                    bookissue.update({_id:id},{$set:{"isreturned":true}},(error,result)=>
                    { 
                        if(error){
                         console.log(error);
                         } 

                         console.log(bookissue.status);
                         var date1 = new Date();
                         console.log(date1);
//Another error is that bookissue.returndate is returning an invalid date message.
                         var date2 = bookissue.returndate;
                         console.log(bookissue.returndate);
                         var timeDiff = Math.abs(date2.getTime() - date1.getTime());
                         var diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24));
                         console.log(diffDays);
                         if (diffDays !== 0) {
                           const res = 50;
                           this.fine = res + diffDays;
                         }

                         else {this.fine = 0; }
                         bookissue.fine=this.fine;
                        console.log(bookissue.fine);
                       });     
                    });    


A: When you update the bookIssue property, you need to save/update the object again.
router.get('/return/:id?',(req,res)=>{
                    var id=req.params.id;
                    console.log(id);
                    bookissue.update({_id:id},{$set:{"isreturned":true}},(error,result)=>
                    { 
                        if(error){
                         console.log(error);
                         } 

                         console.log(bookissue.status);
                         var date1 = new Date();
                         console.log(date1);
//Another error is that bookissue.returndate is returning an invalid date message.
                         var date2 = bookissue.returndate;
                         console.log(bookissue.returndate);
                         var timeDiff = Math.abs(date2.getTime() - date1.getTime());
                         var diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24));
                         console.log(diffDays);
                         if (diffDays !== 0) {
                           const res = 50;
                           this.fine = res + diffDays;
                         }

                         else {this.fine = 0; }
                         bookissue.fine=this.fine;
                         console.log(bookissue.fine);
                         bookissue.save((err, updatedBookIssue) => {
                            if (err) {
                                console.log(err);
                            } else {
                                console.log('Updated book issue');
                                console.log(updatedBookIssue);
                            }
                         });
                       });     
                    });

Check the above code.
After assigning the fine variable, I again save the object.
I added the the following code, at the end of your code
bookissue.save((err, updatedBookIssue) => {
                            if (err) {
                                console.log(err);
                            } else {
                                console.log('Updated book issue');
                                console.log(updatedBookIssue);
                            }
                         });

