Quantcast
Channel: ASPRunner forums
Viewing all articles
Browse latest Browse all 2586

Difficult to adapt a code

$
0
0
I'm having difficulty adapting a code for my project, I need to add days to a date with javascript but the result is expected, could someone help me

follow the code below



var ctrlinicio = Runner.getControl(pageid, 'inicio');
var ctrln_dias = Runner.getControl(pageid, 'n_dias');
var ctrltermino = Runner.getControl(pageid, 'termino');

function func() {
ctrltermino.setValue(Number(ctrlinicio.getValue()) + Number(ctrln_dias.getValue()));
};

ctrlinicio.on('keyup', func);
ctrln_dias.on('keyup', func);

Viewing all articles
Browse latest Browse all 2586