190
rated 0 times
[
197]
[
7]
/ answers: 1 / hits: 40784
/ 11 Years ago, tue, june 11, 2013, 12:00:00
i read many tutorials but i dont know how to do this, this is the input
input(type=text,name=price,id=pricedata-bind=text: price,valueUpdate:['afterkeydown','propertychange','input'])
and this is my viewModel
price: ko.computed(function()
{
return parseFloat(this.replace(' ','').replace(/[^0-9.]+/g,)) || '';
},this)
but this cause error: this has no method replace??? how can i pass the price value to the computed function??
More From » knockout.js