0
Hello, I have a function in Jquery that receives a date parameter in the form Y-m-d, but when I receive this data it does a mathematical subtraction operation and returns the result. I took a look at the forum and found no similar doubt, someone could give me a help?
function funcao(id_cliente,data) {
alert(data);
}
Example: sending the 2018-09-18 value, it treats as 1991.
Sending date in quotes?
'2018-09-18'
– Victor Laio
as @Victorlaio commented, it seems that is passing the values as 2018-09-18, what making the calculation, gives 1991, and not '2018-09-18'
– Ricardo Pontual
So I asked if you’re sending in quotes and yet he keeps performing the calculations, because @Alisson didn’t post an example of the method call...
– Victor Laio