Try: var dateString = "02/24/2014 09:22:21 AM"
dd-mm-yyyy is not a standard date format in EcmaScript. Some browsers implement it, some don't.
You tried replaceing hyphens with baskslashes, but you need to replace them with slashes.
if a date with hyphens comes from your server or something you can replace them using replace
method and regex:
var dateString = "02-24-2014 09:22:21 AM";
dateString = dateString.replace(/-/g, '/');