# Calendar - Android

Native calendar with language support and option to take time also from user.

Can be configured to only take time input from user.

{% hint style="info" %}
You'll need to import the javascript file in your website before starting from this [link](https://docs.webtonative.com/javascript-apis/getting-started).
{% endhint %}

{% tabs %}
{% tab title="Plain JS" %}

```html
window.WTN.showDateTimePicker({
    showDate:true,
    showTime:true,
    callback:function(data){
        console.log("Date Data ->",JSON.stringify(data));
    }
});
```

{% endtab %}

{% tab title="ES 6+" %}

```
import { showDateTimePicker } from "webtonative"

showDateTimePicker({
    showDate:true,
    showTime:true,
    callback:function(data){
        console.log("Date Data ->",JSON.stringify(data));
    }
});
```

{% endtab %}
{% endtabs %}

{% code overflow="wrap" %}

```javascript
Data returned - 

{"success":true,"type":"DATE_TIME_PICKER","date":"2024-7-7","time":"18:30","timestamp":"1723035604669"}

To capture only date - set showDate:true and showTime:false
To capture only time - set showDate:false and showTime:true
To capture both - set showDate:true and showTime:true
```

{% endcode %}

<div align="left"><figure><img src="https://46162361-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbRbEDU7JrvMAgg52AY%2Fuploads%2FjQt5iDWvR0NIvXDVj4jL%2FWhatsApp%20Image%202024-08-07%20at%204.21.23%20PM.jpeg?alt=media&#x26;token=f60cd32d-6ecd-4d39-a3c3-f2efc50892f2" alt=""><figcaption><p>Date view</p></figcaption></figure> <figure><img src="https://46162361-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbRbEDU7JrvMAgg52AY%2Fuploads%2FKNZTjfd967TowFYWzAwW%2FWhatsApp%20Image%202024-08-07%20at%204.21.24%20PM.jpeg?alt=media&#x26;token=86ca18a4-d9e4-41e9-a614-e69ddb27bd48" alt=""><figcaption><p>Time view</p></figcaption></figure></div>
