Question: I have one text box. When I enter a date with the format `MM/DD/YYYY` in that textbox and click outside the textbox I need to display the result as `MM/DD/YYYY+3` using JavaScript.

For example, if my date is 12/31/2013 then the result would be 01/03/2014.

Answer: 
Hope this link will help you to find the answer: 

[adding-number-of-days-to-an-entered-date-in-javascript](http://www.codeigniter.in/blog/post/adding-number-of-days-to-an-entered-date-in-javascript).
I guess the easiest to program and best readable solution would be to use a dedicated library for handling dates, such as [Moment.js](http://momentjs.com/).

There, you have got the [add function](http://momentjs.com/docs/#/manipulating/add/) which allows you to add an arbitrary amount of time to a given point in time. E.g.:

```
moment().add('days', 7);

```

If you use the `moment` function to parse the time entered, use that as your source value, call `add` on it, and return it as JavaScript `Date` using the [toDate function](http://momentjs.com/docs/#/displaying/as-javascript-date/), you get exactly what you want.

So basically it comes down to:

```
var sourceDate = moment(new Date(2013, 7, 8)),
    targetDate = sourceDate.add('days', 3),
    result = targetDate.toDate();

```

Then, `result` contains the `Date` object you wanted to have.

I'd prefer that over native JavaScript handling of `Date`, as it is way more readble and hence understandable.