# How can I auto fill the current date in a datepicker widget?

**URL:** <https://community.ofelia.com/t/how-can-i-auto-fill-the-current-date-in-a-datepicker-widget/7775>\
**Category:** Q&A\
**Created:** [14 September 2016 22:47 UTC](https://community.ofelia.com/t/how-can-i-auto-fill-the-current-date-in-a-datepicker-widget/7775 "2016-09-14T22:47:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![geovanny.campoverde](https://avatars.discourse-cdn.com/v4/letter/g/ecb155/32.png) [@geovanny.campoverde](https://community.ofelia.com/u/geovanny.campoverde)\
**Post date:** [14 September 2016 22:47 UTC](https://community.ofelia.com/t/how-can-i-auto-fill-the-current-date-in-a-datepicker-widget/7775/1 "2016-09-14T22:47:27Z")

</div>

Hello.

I´m using Bonita 7.3.2 and I need to auto fill a datepicker widget with the current date.

There is some way to do this automatically?

Thanks in advance.

Regards,

Geovanny C.

---

<div class="post-metadata">

**Author:** ![agomez\_18](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@agomez\_18](https://community.ofelia.com/u/agomez_18)\
**Post date:** [22 September 2016 21:27 UTC](https://community.ofelia.com/t/how-can-i-auto-fill-the-current-date-in-a-datepicker-widget/7775/2 "2016-09-22T21:27:23Z")

</div>

Hi Geovanny!

How are you?

You must create a variable of type “date” in the BonitaStudio and assign it as the default " Now" value.  
Then on the form you create a "External API " variable called " get\_today " and take the following code:  
…//API/bpm/activityVariable/{{taskId}}/variable\_name

Select the Datepicker and assign in the value field:  
get\_today.value

I hope I’ve helped

Greetings.

---

<div class="post-metadata">

**Author:** ![agomez\_18](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@agomez\_18](https://community.ofelia.com/u/agomez_18)\
**Post date:** [22 September 2016 22:16 UTC](https://community.ofelia.com/t/how-can-i-auto-fill-the-current-date-in-a-datepicker-widget/7775/3 "2016-09-22T22:16:27Z")

</div>

I hope it works for you

---

<div class="post-metadata">

**Author:** ![geovanny.campoverde](https://avatars.discourse-cdn.com/v4/letter/g/ecb155/32.png) [@geovanny.campoverde](https://community.ofelia.com/u/geovanny.campoverde)\
**Post date:** [22 September 2016 22:10 UTC](https://community.ofelia.com/t/how-can-i-auto-fill-the-current-date-in-a-datepicker-widget/7775/4 "2016-09-22T22:10:29Z")

</div>

Thanks a lot for your response.

I will try to do it now.

Regards
