# Datapicker Componet in Ionic2

**URL:** <https://forum.ionicframework.com/t/datapicker-componet-in-ionic2/49482>\
**Category:** ionic-v3\
**Created:** [April 16, 2016, 11:11am UTC](https://forum.ionicframework.com/t/datapicker-componet-in-ionic2/49482 "2016-04-16T11:11:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![chandroiud](https://avatars.discourse-cdn.com/v4/letter/c/8e7dd6/32.png) [@chandroiud](https://forum.ionicframework.com/u/chandroiud)\
**Post date:** [April 16, 2016, 11:11am UTC](https://forum.ionicframework.com/t/datapicker-componet-in-ionic2/49482/1 "2016-04-16T11:11:17Z")

</div>

Is there a datapicker picker component in ionic2, I tried to use the datepicker as given in the ionic docs here: [http://ionicframework.com/docs/v2/native/Date%20Picker/](http://ionicframework.com/docs/v2/native/Date%20Picker/).

I did the following steps:

1. Installed the datepicker cordova plugin: cordova plugin add cordova-plugin-datepicker

2. Added the following code:

`import {DatePicker} from ‘ionic-native’;

DatePicker.show({  
date: new Date(),  
mode: ‘date’  
}).then(  
date =\> console.log("Seleted date is: ", date),  
err =\> console.log(“Error occurred while getting date:”, err)  
);`

I get the error as ‘Module DatePicker not found’. How to install and configure this datepicker plugin? Can I install it via npm? Please help.

---

<div class="post-metadata">

**Author:** ![iborik](https://avatars.discourse-cdn.com/v4/letter/i/3bc359/32.png) [@iborik](https://forum.ionicframework.com/u/iborik)\
**Post date:** [April 16, 2016, 12:10pm UTC](https://forum.ionicframework.com/t/datapicker-componet-in-ionic2/49482/2 "2016-04-16T12:10:28Z")

</div>

the native datepicker doesn’t work on browser.

Try on device self, it should appear.

---

<div class="post-metadata">

**Author:** ![chandroiud](https://avatars.discourse-cdn.com/v4/letter/c/8e7dd6/32.png) [@chandroiud](https://forum.ionicframework.com/u/chandroiud)\
**Post date:** [April 16, 2016, 12:45pm UTC](https://forum.ionicframework.com/t/datapicker-componet-in-ionic2/49482/3 "2016-04-16T12:45:33Z")

</div>

When I try to import Datepicker i get the error as ‘Module not found’.

import {DatePicker} from ‘ionic-native’ So where to find the datepicker module. Have done the installation correctly? Is there any documentation on installing it?

---

<div class="post-metadata">

**Author:** ![chandroiud](https://avatars.discourse-cdn.com/v4/letter/c/8e7dd6/32.png) [@chandroiud](https://forum.ionicframework.com/u/chandroiud)\
**Post date:** [April 16, 2016, 1:54pm UTC](https://forum.ionicframework.com/t/datapicker-componet-in-ionic2/49482/4 "2016-04-16T13:54:33Z")

</div>

Ok got it! I need to add the ionic-native module, I added it using npm install ionic-native, Now the datepicker works!!

The datepicker is bit old fashioned doesn’t show up the material design one or the ios 9 version

It shows something like this: [http://i.imgur.com/0PBFGLQ.png](http://i.imgur.com/0PBFGLQ.png)

Should I update any plugins here? I update cordova-android to 5.0.0 though.

---

<div class="post-metadata">

**Author:** ![iborik](https://avatars.discourse-cdn.com/v4/letter/i/3bc359/32.png) [@iborik](https://forum.ionicframework.com/u/iborik)\
**Post date:** [April 16, 2016, 2:01pm UTC](https://forum.ionicframework.com/t/datapicker-componet-in-ionic2/49482/5 "2016-04-16T14:01:30Z")

</div>

> [@chandroiud](#):
>
> Should I update any plugins here?

I don’t think so, I have the same old fashioned design and I am sure to have all updated.

---

<div class="post-metadata">

**Author:** ![chandroiud](https://avatars.discourse-cdn.com/v4/letter/c/8e7dd6/32.png) [@chandroiud](https://forum.ionicframework.com/u/chandroiud)\
**Post date:** [April 18, 2016, 5:54am UTC](https://forum.ionicframework.com/t/datapicker-componet-in-ionic2/49482/6 "2016-04-18T05:54:55Z")

</div>

Thanks! for the clarification, helped me.
