Get calendar view for datepicker in IONIC


#1

Hello,

Can anyone tell me that how to get calendar view for datepicker in IONIC 3 which can be used for android, iOS and desktop?


#2
        <button style="width:350px;background-color:white;color:black;" item-right ion-button class="positioButton" *ngIf="searchPlaceHolder=='Fecha'">
          <i icon-medium class=" icon-calendar"></i>
          <span *ngIf="dateOfevent" ></span>
           <ion-datetime displayFormat="DD MMM YYYY" (ionChange)="fecha()"  pickerFormat="DD MMM YYYY"  [(ngModel)]="dateOfevent" cancelText ="Cancelar" doneText="Ok"></ion-datetime>          
        </button>

variable global -> dateOfevent…

dateOfevent:string= new Date().toISOString();

//— and function “ionChangue=‘fecha’”.
//-----selected
fecha () {
this.texto =this.dateOfevent.substr(0,10);
console.log("Fecha seleccionada ", this.dateOfevent.substr(0,10));
}


#3

Thanks for the reply.
I am getting a datepicker view like below snapshot.

datepicker

But Is there any way to get view something like below?


#4

yes, use this:


#5

@FnnHuman
Thanks for the Ionic2-Calendar suggestion.


#6

I just published one for Ionic 3 if anyone is interested:

https://github.com/write2sv/ionic-date-picker