Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49256

ION DATETIME: I can only render the wheel, not the calendar grid

$
0
0

HI there, and thanks in advance.

I am having trouble getting the ion-datetime to render as a calander grid. No matter which props I pass the component, I always get the wheel picker. Am I missing something ?

   <div class="date-picker-container">
                  <div class="date-picker-range">
                    <h4 class="date-title">Start date</h4>
                    {/* ion-datetime for selecting start and end dates */}
                    <ion-datetime
                      mode="md"
                      presentation="date" // Adjusted to use date presentation
                      min={toISODateString(sixMonthsAgo)}
                      max={toISODateString(currentDate)}
                      value={toISODateString(sixMonthsAgo)} // Default start date
                      onIonChange={e => (this.startDate = e.detail.value)}
                    ></ion-datetime>
                  </div>
                  <div class="date-picker-range">
                    <h4 class="date-title">End date</h4>

                    <ion-datetime
                      mode="md"
                      // presentation="date"
                      presentation="date" // Adjusted to use date presentation
                      min={toISODateString(sixMonthsAgo)}
                      max={toISODateString(currentDate)}
                      value={toISODateString(currentDate)} // Default end date
                      onIonChange={e => (this.endDate = e.detail.value)}
                    ></ion-datetime>
                  </div>
                </div>

I am using ionic/core : 7.4.4

Developing on a macbook pro.

Thanks !

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 49256

Trending Articles