SteveSanderson/knockout — Issue #369: Consider adding a "date" binding
Author: SteveSanderson
Created: 2012-03-07 18:11:59+00:00
State: open
Labels: vFuture

This issue is just a reminder to give this further consideration for a future version.

It's already easy to work with any of the JavaScript primitive types (string, number, boolean) with KO + form fields, with the exception of dates. Currently, to make a date property editable, you need to either:

1. Use a date picker component, e.g., jQuery UI's date picker, via a custom binding
2. Or, write custom code to format the date as a string, bind it to a text box, and parse edits back into a date (e.g., via a writable computed).

We could consider adding a `date` or `datevalue` binding that implements option (2) for you, so you can bind date properties to textboxes without needing any custom code. Since there are multiple ways to format dates, the design might be:

* By default, it displays and parses ISO format (built into the JS runtime) only.
* If you have referenced [XDate](http://arshaw.com/xdate/) or similar, you can supply additional formatting options.