I want to implement customized calendar in ionic2
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
review this.
Thanks,
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?)
This all are done
but what type of content i write in html and component file? that is my issue
I use this plugin
And is fantastic
If you want try it
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?
there is just simple tag to display calender in you page
<ion-calendar [(ngModel)]=ādateā
(onChange)=āonChange($event)ā
(monthChange)=āmonthChange($event)ā
[format]=āformatā>
Hi, @hirenkorat3
Not working
which version of angular you use ?
angular version 3.10.10
then it may not be work
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
please give me html code that show calendar
HTML
<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 !
Template parse errors:
Canāt bind to āformatā since it isnāt a known property of āion-calendarā.
- If āion-calendarā is an Angular component and it has āformatā input, then verify that it is part of this module.
- If āion-calendarā is a Web Component then add āCUSTOM_ELEMENTS_SCHEMAā to the ā@NgModule.schemasā of this component to suppress this message.
- 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: - If āion-calendarā is an Angular component, then verify that it is part of this module.
- 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
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