I can't believe I ask this kind of question. But I had to do it as I don't have much hairs left to stretch.
I am using MVC4 RC WEB API and knockout. If I call GET method of the web api, I get an object with a datetime property which was automatically converted as a string such as '2012-05-12T00:00:00' via JSON.NET.
But how can I convert this string to javascript format to use jquery ui such as calendar? I tried various methods in vain.
UPDATE: I believe it was not Date class. It was jquery calendar (and me, of course). I didn't know I had to specify minDate like this to show correct value of the date. Maybe there is better way to do it?
<div class="editor-label">Date: </div>
<div class="editor-field">
<input data-bind="datepicker: selectedGroup().InspectionDate,
datepickerOptions: { minDate: selectedGroup().InspectionDate }">
</input>
</div>
var d = new Date("2012-05-12T00:00:00");doesn't work for you?!