Answer the question
In order to leave comments, you need to log in
Select a number after a certain number of days from a given one?
Good afternoon.
I'm making a small app for mobile phones.
Task - a person sets the date and interval (For example: May 1, 20 days), you need to select the date that will be after the interval (In the previous example, May 1 was set and the interval is 20 days, May 21 will be selected accordingly).
For the calendar I use https://github.com/wix/react-native-calendars
Can you tell me how to implement it?
Answer the question
In order to leave comments, you need to log in
I think the add days function looks like this
function addDays(date, days) {
var result = new Date(date);
result.setDate(result.getDate() + days);
return result;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question