Skip to content

Instantly share code, notes, and snippets.

@angelyordanov
angelyordanov / date_bindings.js
Last active December 12, 2015 06:38
The 'datePicker' and 'dateValue' knockout binding handlers.
function BindingHandlerFactory(bindingKey, handlerConstructor) {
this.init = $.proxy(this.init, this);
this.update = $.proxy(this.update, this);
this._jqDataKey = 'bhf.' + bindingKey;
this._handlerConstructor = handlerConstructor;
}
BindingHandlerFactory.prototype.init = function (element, valueAccessor) {
var self = this;