# Input type "date" doesn't work with AlertController

**URL:** <https://forum.ionicframework.com/t/input-type-date-doesnt-work-with-alertcontroller/90221>\
**Category:** ionic-v3\
**Created:** [May 14, 2017, 4:47pm UTC](https://forum.ionicframework.com/t/input-type-date-doesnt-work-with-alertcontroller/90221 "2017-05-14T16:47:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![LuckyLarry](https://avatars.discourse-cdn.com/v4/letter/l/db5fbb/32.png) [@LuckyLarry](https://forum.ionicframework.com/u/LuckyLarry)\
**Post date:** [May 14, 2017, 4:47pm UTC](https://forum.ionicframework.com/t/input-type-date-doesnt-work-with-alertcontroller/90221/1 "2017-05-14T16:47:00Z")

</div>

Hi everybody,

I have a big problem, I use a AlertController to put my data from my inputs in my BDD, but I cannot define my input date like an input date ([http://ionicframework.com/html5-input-types/#date](http://ionicframework.com/html5-input-types/#date)).

Look my pictures :

![image](https://global.discourse-cdn.com/ionicframework/original/3X/0/0/0096005ae7a6d962fe18c5444e8478b49363eeee.jpg)

![image](https://global.discourse-cdn.com/ionicframework/original/3X/2/e/2e333e614c3ecbf361017ccf686d062611c88d55.jpg)

I thought maybe to recover the date of the day in a variable “MyDate” and put this like this :

inputs: [  
{  
name: ‘date’,  
type: ‘date’,  
value: MyDate  
},

But I don’t know how I can recover easily the date of the current day.

Please help me !

---

<div class="post-metadata">

**Author:** ![LuckyLarry](https://avatars.discourse-cdn.com/v4/letter/l/db5fbb/32.png) [@LuckyLarry](https://forum.ionicframework.com/u/LuckyLarry)\
**Post date:** [May 14, 2017, 9:50pm UTC](https://forum.ionicframework.com/t/input-type-date-doesnt-work-with-alertcontroller/90221/2 "2017-05-14T21:50:52Z")

</div>

Ok, it’s works only on mobile and not in my server on firefox. But It’s possible to put the date of today automatically in the value ?

Thank you for your help

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [May 14, 2017, 11:54pm UTC](https://forum.ionicframework.com/t/input-type-date-doesnt-work-with-alertcontroller/90221/3 "2017-05-14T23:54:49Z")

</div>

You are posting in the Ionic category, but linking to v1 documentation. Which is it?

---

<div class="post-metadata">

**Author:** ![LuckyLarry](https://avatars.discourse-cdn.com/v4/letter/l/db5fbb/32.png) [@LuckyLarry](https://forum.ionicframework.com/u/LuckyLarry)\
**Post date:** [May 15, 2017, 9:02am UTC](https://forum.ionicframework.com/t/input-type-date-doesnt-work-with-alertcontroller/90221/4 "2017-05-15T09:02:36Z")

</div>

sorry about that it’s ionic v3, but firefox doesn’t wok with the input type “date”

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [May 15, 2017, 8:09pm UTC](https://forum.ionicframework.com/t/input-type-date-doesnt-work-with-alertcontroller/90221/5 "2017-05-15T20:09:19Z")

</div>

Is there a reason you’re avoiding `<ion-datetime>`?

---

<div class="post-metadata">

**Author:** ![vasanthb](https://avatars.discourse-cdn.com/v4/letter/v/4da419/32.png) [@vasanthb](https://forum.ionicframework.com/u/vasanthb)\
**Post date:** [October 12, 2018, 9:20am UTC](https://forum.ionicframework.com/t/input-type-date-doesnt-work-with-alertcontroller/90221/6 "2018-10-12T09:20:39Z")

</div>

Hi, Even I’m facing the same issue, unable to keep a default value in input type date. Did you find solution for the same?
