IMRUP
IMRUP

Reputation: 1513

Passing Date to javascript function

$(document).ready(function() {
    //calling procedure which displays list of items by default.
    DisplayList(2, '2', '2', 0);
});

DisplayList(2, fromDate, toDate, selectedvalue) {
//parameter 2 is passed for procedure
}

function Functioncalling {
    // fromDate and toDate values from asp textbox
    DisplayList(2, fromDate, toDate, selectedvalue);
}

fromdate and todates has 'year' value. loss of day and month values as well as different year which is not selected. when DisplayList from function is called.

Please help me out to get . Thank you

Upvotes: 0

Views: 70

Answers (1)

Super Hornet
Super Hornet

Reputation: 2907

if DisplayList(2, fromDate, toDate, selectedvalue) {...} is kind of declaration you can not use a number as a parameter name 2;

Upvotes: 1

Related Questions