Ion-Datetime problem with hardware back button and navCtrl.back()

Hi, I have a problem that I can’t solve. When I go back from a page using “this.navCtrl.navigateRoot([‘…’])” everything works, but when I use the hardware back button and use “this.navCtrl.back()” it goes back to the previous page but since then the IonDatetime component can no longer set the day.

The problem is that having so many pages in the app I can’t set which is the return page for each single page. It has to be automatic…


This will help you

Thanks for your answer. I had already read everything in the documentation. The problem is not going back to the previous page, that works. The problem is that if I return with navCtrl.back() as soon as I reopen a page with an ion-datetime I can’t select the day anymore. If I use navCtrl.navigateRoot([“returnPage”]) to go back when I go to the page with ion-datetime the day selection works fine.

If I have not misunderstood with the “back()” function, the application “pops” to return to the previous page view (without recreating the page). If I use “navigateRoot()” all previous instances are deleted and the page is recreated.