-1
I need to do a function in Javascript/jQuery that I take the value of two fields of date format and it returns me a sequence of dates as I choose: 1st or 2nd Tuesday of the selected period in the fields data1
and data2
. I don’t know where to start, I’m a beginner...
Exp:
data1 = 06/05/2019;
data2 = 01/10/2019;
opção = 1ª segunda-feira;
resultado =
06/05/2019
03/06/2019
01/07/2019
05/08/2019
02/09/2019
.... até a data final caso seja compatível com a opção selecionada.
Show the code you’ve already implemented and highlight the part where you’re having trouble. Error message and stack trace would greatly help to debug your code.
– Augusto Vasques
So @Augustovasques as I stated in the statement, I haven’t started anything yet. I was reading about the function `new Date() and I couldn’t quite understand how it works when I type a date by input. (I know it shows me the date in full format including hours, minutes.,)! I’d like to at least find a starting point!
– Rodrigo Henriques