self.holdoldValueforYear=ko.observable();
self.year.subscribe(function (previousValue) {
//I'd like to get the previous value of 'year' here before it's set to newValue
self.holdoldValueforYear(previousValue);
}, self, "beforeChange");
self.year.subscribe(function (yearValue) {
if (yearValue < self.holdoldValueforYear()) {
self.year(self.holdoldValueforYear());
}
},self);
No comments:
Post a Comment