ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

feat: ion-datetime to show day picker when selecting month and year

Open Saqib92 opened this issue 1 month ago • 0 comments

Prerequisites

Describe the Feature Request

Can we have day picker when selecting month and year ?

Image

Describe the Use Case

A day picker when selecting month and date would be a better UX.

Describe Preferred Solution

currently this i my setup:

html:

@if(!isDateTIme){
<ion-datetime presentation="date" [preferWheel]="false" [max]="minDateOfBirth" mode="ios"
  [value]="dateOfBirth" (ionFocus)="onDateFocus($event)" mode="ios">
</ion-datetime>
}
@else{
<ion-datetime presentation="date" [preferWheel]="true" [max]="minDateOfBirth" [showDefaultButtons]="true"
  mode="ios" [value]="dateOfBirth" (ionChange)="submitDob($event)" mode="ios">
</ion-datetime>
}

.ts:

submitDob(e: any) {
  this.isDateTIme = false;
}

onDateFocus(e: any) {
  this.isDateTIme = true;
}

Describe Alternatives

none

Related Code

@if(!isDateTIme){
<ion-datetime presentation="date" [preferWheel]="false" [max]="minDateOfBirth" mode="ios"
  [value]="dateOfBirth" (ionFocus)="onDateFocus($event)" mode="ios">
</ion-datetime>
}
@else{
<ion-datetime presentation="date" [preferWheel]="true" [max]="minDateOfBirth" [showDefaultButtons]="true"
  mode="ios" [value]="dateOfBirth" (ionChange)="submitDob($event)" mode="ios">
</ion-datetime>
}
submitDob(e: any) {
    this.isDateTIme = false;
  }

  onDateFocus(e: any) {
    this.isDateTIme = true;
  }

Additional Information

No response

Saqib92 avatar Nov 07 '25 10:11 Saqib92