# How to implement calendar in ionic

**URL:** <https://forum.ionicframework.com/t/how-to-implement-calendar-in-ionic/106729>\
**Category:** ionic-v3\
**Created:** [September 26, 2017, 5:08am UTC](https://forum.ionicframework.com/t/how-to-implement-calendar-in-ionic/106729 "2017-09-26T05:08:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![cooldp007](https://avatars.discourse-cdn.com/v4/letter/c/c4cdca/32.png) [@cooldp007](https://forum.ionicframework.com/u/cooldp007)\
**Post date:** [September 26, 2017, 5:08am UTC](https://forum.ionicframework.com/t/how-to-implement-calendar-in-ionic/106729/1 "2017-09-26T05:08:06Z")

</div>

I want to implement customized calendar in ionic2

---

<div class="post-metadata">

**Author:** ![addwebsolution](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/addwebsolution/32/120392_2.png) [@addwebsolution](https://forum.ionicframework.com/u/addwebsolution)\
**Post date:** [September 26, 2017, 5:47am UTC](https://forum.ionicframework.com/t/how-to-implement-calendar-in-ionic/106729/2 "2017-09-26T05:47:42Z")

</div>

Hi @cooldp007,

> **[Ionic Framework](https://ionicframework.com/docs/native/calendar/)**
>
> Ionic is the app platform for web developers. Build amazing mobile, web, and desktop apps all with one shared code base and open web standards

May be this can help you in getting your solution.

Thanks,

---

<div class="post-metadata">

**Author:** ![cooldp007](https://avatars.discourse-cdn.com/v4/letter/c/c4cdca/32.png) [@cooldp007](https://forum.ionicframework.com/u/cooldp007)\
**Post date:** [September 26, 2017, 5:55am UTC](https://forum.ionicframework.com/t/how-to-implement-calendar-in-ionic/106729/3 "2017-09-26T05:55:35Z")

</div>

Hi, @addwebsolution

I got this error

No provider for Calendar!

---

<div class="post-metadata">

**Author:** ![addwebsolution](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/addwebsolution/32/120392_2.png) [@addwebsolution](https://forum.ionicframework.com/u/addwebsolution)\
**Post date:** [September 26, 2017, 5:57am UTC](https://forum.ionicframework.com/t/how-to-implement-calendar-in-ionic/106729/4 "2017-09-26T05:57:36Z")

</div>

Yes, because you need to add the Calendar in the providers list.

For more information [https://ionicframework.com/docs/native/#Add\_Plugins\_to\_Your\_App\_Module](https://ionicframework.com/docs/native/#Add_Plugins_to_Your_App_Module)

review this.

Thanks,

---

<div class="post-metadata">

**Author:** ![cooldp007](https://avatars.discourse-cdn.com/v4/letter/c/c4cdca/32.png) [@cooldp007](https://forum.ionicframework.com/u/cooldp007)\
**Post date:** [September 26, 2017, 6:00am UTC](https://forum.ionicframework.com/t/how-to-implement-calendar-in-ionic/106729/5 "2017-09-26T06:00:31Z")

</div>

You are right,  
error solved

now i don’t know how to use in my ionic 2 project (It means what should i write in html and in component file?)

---

<div class="post-metadata">

**Author:** ![addwebsolution](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/addwebsolution/32/120392_2.png) [@addwebsolution](https://forum.ionicframework.com/u/addwebsolution)\
**Post date:** [September 26, 2017, 6:42am UTC](https://forum.ionicframework.com/t/how-to-implement-calendar-in-ionic/106729/6 "2017-09-26T06:42:38Z")

</div>

> **[EddyVerbruggen/Calendar-PhoneGap-Plugin](https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin)**
>
> Calendar-PhoneGap-Plugin - :date: Cordova plugin to Create, Change, Delete and Find Events in the native Calendar

This will help you in getting calendar working in your project.

---

<div class="post-metadata">

**Author:** ![cooldp007](https://avatars.discourse-cdn.com/v4/letter/c/c4cdca/32.png) [@cooldp007](https://forum.ionicframework.com/u/cooldp007)\
**Post date:** [September 26, 2017, 6:50am UTC](https://forum.ionicframework.com/t/how-to-implement-calendar-in-ionic/106729/7 "2017-09-26T06:50:49Z")

</div>

This all are done  
but what type of content i write in html and component file? that is my issue

---

<div class="post-metadata">

**Author:** ![filippodicostanzo](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/filippodicostanzo/32/112826_2.png) [@filippodicostanzo](https://forum.ionicframework.com/u/filippodicostanzo)\
**Post date:** [September 26, 2017, 8:02am UTC](https://forum.ionicframework.com/t/how-to-implement-calendar-in-ionic/106729/8 "2017-09-26T08:02:11Z")

</div>

I use this plugin

> **[twinssbc/Ionic2-Calendar](https://github.com/twinssbc/Ionic2-Calendar)**
>
> Ionic2-Calendar - A calendar directive for Ionic2

And is fantastic 🙂

If you want try it

---

<div class="post-metadata">

**Author:** ![cooldp007](https://avatars.discourse-cdn.com/v4/letter/c/c4cdca/32.png) [@cooldp007](https://forum.ionicframework.com/u/cooldp007)\
**Post date:** [September 26, 2017, 8:53am UTC](https://forum.ionicframework.com/t/how-to-implement-calendar-in-ionic/106729/9 "2017-09-26T08:53:12Z")

</div>

Hi, @filippodicostanzo

Thank you for providing me a document for calendar

All error are solved

but i saw my page blank

How to show calendar in my page?

---

<div class="post-metadata">

**Author:** ![hirenkorat3](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/hirenkorat3/32/128872_2.png) [@hirenkorat3](https://forum.ionicframework.com/u/hirenkorat3)\
**Post date:** [September 26, 2017, 10:54am UTC](https://forum.ionicframework.com/t/how-to-implement-calendar-in-ionic/106729/10 "2017-09-26T10:54:10Z")

</div>

there is just simple tag to display calender in you page

\<ion-calendar [(ngModel)]=“date”  
(onChange)=“onChange($event)”  
(monthChange)=“monthChange($event)”  
[format]=“format”\>

---

<div class="post-metadata">

**Author:** ![hirenkorat3](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/hirenkorat3/32/128872_2.png) [@hirenkorat3](https://forum.ionicframework.com/u/hirenkorat3)\
**Post date:** [September 26, 2017, 10:56am UTC](https://forum.ionicframework.com/t/how-to-implement-calendar-in-ionic/106729/11 "2017-09-26T10:56:07Z")

</div>

@cooldp007

Here You can get demo from git just download and refer it.

> **[HsuanXyz/ion2-calendar](https://github.com/HsuanXyz/ion2-calendar)**
>
> ion2-calendar - 📅 A date picker components for ionic2 ／ionic3

---

<div class="post-metadata">

**Author:** ![cooldp007](https://avatars.discourse-cdn.com/v4/letter/c/c4cdca/32.png) [@cooldp007](https://forum.ionicframework.com/u/cooldp007)\
**Post date:** [September 26, 2017, 11:31am UTC](https://forum.ionicframework.com/t/how-to-implement-calendar-in-ionic/106729/12 "2017-09-26T11:31:01Z")

</div>

Hi, @hirenkorat3

Not working

---

<div class="post-metadata">

**Author:** ![hirenkorat3](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/hirenkorat3/32/128872_2.png) [@hirenkorat3](https://forum.ionicframework.com/u/hirenkorat3)\
**Post date:** [September 26, 2017, 11:40am UTC](https://forum.ionicframework.com/t/how-to-implement-calendar-in-ionic/106729/13 "2017-09-26T11:40:31Z")

</div>

which version of angular you use ?

---

<div class="post-metadata">

**Author:** ![cooldp007](https://avatars.discourse-cdn.com/v4/letter/c/c4cdca/32.png) [@cooldp007](https://forum.ionicframework.com/u/cooldp007)\
**Post date:** [September 26, 2017, 11:41am UTC](https://forum.ionicframework.com/t/how-to-implement-calendar-in-ionic/106729/14 "2017-09-26T11:41:46Z")

</div>

angular version 3.10.10

---

<div class="post-metadata">

**Author:** ![hirenkorat3](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/hirenkorat3/32/128872_2.png) [@hirenkorat3](https://forum.ionicframework.com/u/hirenkorat3)\
**Post date:** [September 26, 2017, 11:45am UTC](https://forum.ionicframework.com/t/how-to-implement-calendar-in-ionic/106729/15 "2017-09-26T11:45:02Z")

</div>

then it may not be work

---

<div class="post-metadata">

**Author:** ![hirenkorat3](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/hirenkorat3/32/128872_2.png) [@hirenkorat3](https://forum.ionicframework.com/u/hirenkorat3)\
**Post date:** [September 26, 2017, 11:45am UTC](https://forum.ionicframework.com/t/how-to-implement-calendar-in-ionic/106729/16 "2017-09-26T11:45:27Z")

</div>

you have to use angular 4 because it is angular 4 component.  
so just update the angular to latest version and then try it will work

---

<div class="post-metadata">

**Author:** ![cooldp007](https://avatars.discourse-cdn.com/v4/letter/c/c4cdca/32.png) [@cooldp007](https://forum.ionicframework.com/u/cooldp007)\
**Post date:** [September 26, 2017, 11:46am UTC](https://forum.ionicframework.com/t/how-to-implement-calendar-in-ionic/106729/17 "2017-09-26T11:46:17Z")

</div>

please give me html code that show calendar

---

<div class="post-metadata">

**Author:** ![hirenkorat3](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/hirenkorat3/32/128872_2.png) [@hirenkorat3](https://forum.ionicframework.com/u/hirenkorat3)\
**Post date:** [September 26, 2017, 11:50am UTC](https://forum.ionicframework.com/t/how-to-implement-calendar-in-ionic/106729/18 "2017-09-26T11:50:15Z")

</div>

HTML

```auto
<ion-card>
    <ion-card-content>
      <ion-card-title>
        basic
      </ion-card-title>
      <ion-calendar [(ngModel)]="date"
                    [format]="format">
      </ion-calendar>
      <p>{{date}}</p>
    </ion-card-content>
  </ion-card>

```

TS FILE

date: string;  
format = ‘YYYY-MM-DD’;

just do this it will work 100% for me  
let see what happens for you !

---

<div class="post-metadata">

**Author:** ![cooldp007](https://avatars.discourse-cdn.com/v4/letter/c/c4cdca/32.png) [@cooldp007](https://forum.ionicframework.com/u/cooldp007)\
**Post date:** [September 26, 2017, 11:53am UTC](https://forum.ionicframework.com/t/how-to-implement-calendar-in-ionic/106729/19 "2017-09-26T11:53:22Z")

</div>

@hirenkorat3

Template parse errors:  
Can’t bind to ‘format’ since it isn’t a known property of ‘ion-calendar’.

1. If ‘ion-calendar’ is an Angular component and it has ‘format’ input, then verify that it is part of this module.
2. If ‘ion-calendar’ is a Web Component then add ‘CUSTOM\_ELEMENTS\_SCHEMA’ to the ‘@NgModule.schemas’ of this component to suppress this message.
3. To allow any property add ‘NO\_ERRORS\_SCHEMA’ to the ‘@NgModule.schemas’ of this component. (“nTimeSelected($event)” step=“30”\>  
\<ion-calendar [(ngModel)]=“date”  
[ERROR -\>][format]=“format”\>  
  
"): ng:///SearchModule/SearchPage.html@50:20  
’ion-calendar’ is not a known element:
4. If ‘ion-calendar’ is an Angular component, then verify that it is part of this module.
5. If ‘ion-calendar’ is a Web Component then add ‘CUSTOM\_ELEMENTS\_SCHEMA’ to the ‘@NgModule.schemas’ of this component to suppress this message. (“ged)=“onViewTitleChanged($event)” (onTimeSelected)=“onTimeSelected($event)” step=“30”\>  
[ERROR -\>]\<ion-calendar [(ngModel)]=“date”  
[format]=“format”\>  
  
”): ng:///SearchModule/SearchPage.html@49:13

---

<div class="post-metadata">

**Author:** ![hirenkorat3](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/hirenkorat3/32/128872_2.png) [@hirenkorat3](https://forum.ionicframework.com/u/hirenkorat3)\
**Post date:** [September 26, 2017, 11:55am UTC](https://forum.ionicframework.com/t/how-to-implement-calendar-in-ionic/106729/20 "2017-09-26T11:55:30Z")

</div>

this is error of angular,you must have to upgrade your angular version.  
if you want to test is then start new project and then in home page copy paste the html and ts file

[Next page](https://forum.ionicframework.com/t/how-to-implement-calendar-in-ionic/106729.md?page=2)
