I have a date in format dd/mm/yyyy and when I try to use getMonth()
I get the dd field.
For example if I have "01/12/2019" it will take 01 as month instead of 12. Is there a way to get the month from this format?
This is my code:
var beginDate = document.getElementById("beginDate").value;
var month = new Date(beginDate).getMonth();
inside beginDate
there's "01/10/2019"
(October 1st 2019)