> For the complete documentation index, see [llms.txt](https://docs.webtonative.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.webtonative.com/javascript-apis/calendar-android.md).

# Android Calendar API

Access and manage Android calendar events using the WebToNative JavaScript API. Create, update, and read calendar entries seamlessly.

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

Can be configured to only take time input from the user.

{% hint style="info" %}
You'll need to import the JavaScript file into 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="npm" %}

```
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&amp;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&amp;token=86ca18a4-d9e4-41e9-a614-e69ddb27bd48" alt=""><figcaption><p>Time view</p></figcaption></figure></div>
