i am trying to convert a string in the format dd-mm-yyyy into a date object in JavaScript using the following:
var from = $(\"#datepicker\").val(); var to
Use this format: myDate = new Date('2011-01-03'); // Mon Jan 03 2011 00:00:00
myDate = new Date('2011-01-03'); // Mon Jan 03 2011 00:00:00
Take a look at Datejs for all those petty date related issues.. You could solve this by parseDate function too