I have textbox( id='txtCalendarSeventh' ) which have a calendar control associated with it. On Selecting any date from calendar I get the value in textbox in the format- Apr-21-2014 . 

I am using the following javascript code-

```
 var dateresult = document.getElementById('txtCalendarSeventh').value;
    var d = new Date(dateresult);
    alert(d);

```

This code works fine in chrome and dispalys correct value of date. But in firefox or internet explorer it is showing Nan.Nan.Nan etc instead of correct date.