toLocaleDateString is not a function code example
Example 1: react this.state.selectedDays.toLocaleDateString is not a function
function formatTime(time, prefix = "") {
return typeof time == "object" ? prefix + time.toLocaleDateString() : "";
}
Example 2: tolocaledatestring not working in safari
console.log (new Date('2011-04-12'.replace(/-/g, "/")));