I am trying to post objects from a bootstrap modal to the local storage in JavaScript. The set of details gets posted to the local storage but the other form entries do not. Here is my code.
//function to add tasks to the loacal storage
function addTask() {
myTasks.push(new TaskManager(id,taskName.value,assignedTo.value,dueDate.value,statusButton.value,description.value ));
localStorage.setItem("tasks", JSON.stringify(myTasks));
}
Probably your TaskManager object is not being created correctly. Check by sending the object that you are managing to create, as a parameter of the addTask() function.