How do I generate a function js to do the calculation of when it starts and when the week ends from a day that the user selected. (Taking into account that the only one from Monday to Friday)
Example of how it is intended to be, should be indicated that the calculation will be per week, then must show the calendar for the user to select a day of the week, when the user has indicated the day, on the side will be an input in which you should print what the start and end of the week is depending on the date you selected, for example if you select Tuesday, February 6, 2018, the input data should read Start 05-02 -2018 ends on 09-02-2018 ..... Taking as a start day every Monday and Friday as a final day