knockout.js の概念を深く掘り下げると、ko.observable にその値を解析/書き込む方法を次のように伝えることができない理由を理解するのに苦労しています。
dateValue = ko.observable({
read: function (dateString) {
/*convert a date string to an object here for internal storage*/
return Globalize.parseDate(dateString, 'd');
},
write: function (dateObj) {
/*format a date object for output*/
return Globalize.formatDate(dateObj, 'd');
}
})
この目的のために ko.computed が存在することは承知していますが、 read() の結果を書き込む必要がある「シャドウ」オブザーバブルを保持する必要があります。