Have simple function which returns an error:
ERROR: date.toLocaleDateString is not a function
TypeError: date.toLocaleDateString is not a function
at FormatTime (../Src/rootdialog.js:87:58)
Function definition:
function FormatTime(time, prefix = "") {
var date = Date.parse(time);
return ((typeof time != "undefined") ? prefix + date.toLocaleDateString() : "");
}
Function receives Date
object as input however even explicit conversion to Date
with Date.parse()
does not help. Using Node.js 8.x. Any solution?
P.S. Issue was caused by BotBuilder architecture.