# Adding a javascript snippet

**URL:** <https://forum.adalo.com/t/adding-a-javascript-snippet/9654>\
**Category:** External Collections, Custom Actions & Collections\
**Created:** [February 25, 2021, 3:19pm UTC](https://forum.adalo.com/t/adding-a-javascript-snippet/9654 "2021-02-25T15:19:35Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Dilon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/dilon/32/39815_2.png) [@Dilon](https://forum.adalo.com/u/Dilon)\
**Post date:** [July 28, 2022, 10:07pm UTC](https://forum.adalo.com/t/adding-a-javascript-snippet/9654/11 "2022-07-28T22:07:54Z")

</div>

Check this : [Add Months in JS.mp4 - Google Drive](https://drive.google.com/file/d/1oFvaiTq_sn6CihtK1G_CbuwkCHL8xSyW/view?usp=sharing)

> **JS**
>
> ```auto
> var date = new Date('date_input');
> var date = date.setMonth(date.getMonth() + months_input);
> var after_date = new Date(date);
> var formatted = (after_date.getMonth()+1)+'-' + after_date.getDate() + '-'+after_date.getFullYear();
> return formatted;
> 
> ```
> 
> ( In here replace the inputs with date\_input text and months\_input text! )

> **The Component Details**
>
> Instructions to download components from Pragmaflow website : [PragmaFlow's Adalo Marketplace Reopened - YouTube](https://www.youtube.com/watch?v=4mo_u5EdEWw)
> 
> Pragmaflow website : [https://adalo.pragmaflowservers.com/install-component](https://adalo.pragmaflowservers.com/install-component)
> 
> The component you need :
> 
> ![image](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/2/7/27091a946a15503e54fd4dadb73ddccc9f6a72cf.png)

Thank you

---

_[View the full topic](https://forum.adalo.com/t/adding-a-javascript-snippet/9654)._
