我正在尝试自定义绑定以作为日期选择器输入:代码在这里:http ://sdrv.ms/Xc5HZw
我有以下代码,但验证在无效时不会突出显示控件:
ko.bindingHandlers.datepicker = {
init: function (element, valueAccessor, allBindingsAccessor) {
// code here
ko.bindingHandlers.validationCore.init(element, valueAccessor, allBindingsAccessor);
},
update: function (element, valueAccessor) {
// code here
}
};