Skip to content

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

@Saqib92

Description

@Saqib92

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions