如何绑定输入类型' time'在knockout.js

时间:2015-01-26 01:16:40

标签: knockout.js

我认为它是这样的,但它不起作用 -

HTML:

<input id="timePicker" type="time" placeholder="HH:MM" required="" data-bind="value: timeFrom">

JS:

self.timeFrom = ko.observable("8:00");

1 个答案:

答案 0 :(得分:6)

应设置为"08:00"

self.timeFrom = ko.observable("08:00");

JsFiddle