121
rated 0 times
[
126]
[
5]
/ answers: 1 / hits: 15474
/ 7 Years ago, wed, october 25, 2017, 12:00:00
I need to convert an <input type="date">
value in a timestamp. This is my HTML code:
<input type="date" name="date_end" id="date_end">
This field has a value that I have put like 25/10/2017
My jQuery code is:
var dataEnd = $('[name="date_end"]').val();
if (!dataEnd) {
return false;
} else {
var timestamp_end=$('[name="date_start"]').val().getTime();
console.log("TIMESTAMP END "+timestamp_end);
.....
}
But this is not working... why not?
More From » html