1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

How To Get Currently Shown Calendar Month/Year in Ionic 8 (angular) using ion-datetime

Discussão em 'Angular' iniciado por ustad, Março 13, 2025.

  1. ustad

    ustad Guest

    Using the <ion-datetime> component, when you use the forward/back arrows to traverse between months of a calendar, it does not trigger an ionChange() event. Instead it triggers an ionFocus() event and this event does not pass any information about what calendar/month the user is on now. If I select a date within the calendar then it will pass that along to the ionChange() handler within the $event.detail property.

    Here is what I'm referring to:

    [​IMG]

    I've tried everything under the sun but all to no avail. I just want to display a list of events for each month, beneath the calendar when the user traverses using the left/right arrows so I need to know what month/year they are on! Note that the date picker on the left does trigger an ionChange() event.

    Continue reading...

Compartilhe esta Página