How does upshot.js handles DateTime objects?
As it seems its just creating "normal" strings and not creating a real JS date object.
All the problems related to JSON date formatting and MVC are discussed here already: Handling dates with Asp.Net MVC and KnockoutJS
So even after changing the MVC default JSON formatter to JSON.Net its still not doing an automatic conversion to date. Unfortunately all the bindings must be done "per hand" to create a Date object internally. With the JSON.Net formatted date to new Date(string) approach seems to work ok as the constructor is abel to handle the date formatstring perfect.
Is there a "general" lib available for handling all the different value types in bindings for knockout?
This is an old story, due to the fact that json has no default format for dates. Moreover, the format /Date(.....)/ pretended by .Net (.Net not just asp.net) is not easy to handle also with the json customization allowed by all modern browsers:
if you use the client blocks feature of the Mvc Controls Toolkit project(I am the coordinator of) you can use an "enhanced" knockout that handles automatically problems 1 and 2. In the next release to come in a few days I will add also the automatic handling of problem 3. However...this WILL NOT SOLVE the problem of upshot...since I hooked the mapping functions of the knokout mapping plugin that are not used by upshot to send data back on the server...and since upshot calls directly JSON.stringify...there seems to be no way to fix the problem...other than modifying upshot to handle json custom formats when posting data.
In the upcomig release of Client Blocks I will provide an UpdateManager class that do a job "similar" to upshot that handle properly dates...However this will never be a substitute for upshot since it uses a quite different update strategy...and is just an option MORE not a substitute. So I hope that in the final release of upshot there will be the possibility to customize the json formatting of data.