Ionic-framework: [Ionic V4-beta.17] ion-datetime min value limits correct dates

Created on 28 Sep 2018  路  8Comments  路  Source: ionic-team/ionic-framework

Bug Report

Ionic Info
Run ionic info from a terminal/cmd prompt and paste the output below.

Ionic:

   ionic (Ionic CLI)          : 4.1.2 (/Users/robinhinderiks/.nvm/versions/node/v8.11.4/lib/node_modules/ionic)
   Ionic Framework            : @ionic/angular 4.0.0-beta.12
   @angular-devkit/core       : 0.8.3
   @angular-devkit/schematics : 0.8.3
   @angular/cli               : 6.2.3
   @ionic/ng-toolkit          : 1.0.8
   @ionic/schematics-angular  : 1.0.6

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : ios 4.5.5
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.2, cordova-plugin-ionic-webview 2.1.0, (and 13 other plugins)

System:

   Android SDK Tools : 26.1.1 (/Users/robinhinderiks/Library/Android/sdk)
   ios-deploy        : 1.9.2
   ios-sim           : 6.0.0
   NodeJS            : v8.11.4 (/Users/robinhinderiks/.nvm/versions/node/v8.11.4/bin/node)
   npm               : 6.4.1
   OS                : macOS High Sierra
   Xcode             : Xcode 10.0 Build version 10A255

Describe the Bug
When setting min value in the ion-datetime too for example today (28 september 2018) i can no longer select anything below 28, anything below september even though 1 januari 2019 should be perfectly fine.

Steps to Reproduce
Create a page with ion-datetime.
Set a min value to today.
Set the current date to today.
Select 2019.
Now try to select januari or any other month or date below today.

Expected Behavior
It looks like it does work if you first select 2019. Press done. Reselect the date input and than you can go to other dates that should work the first time. So the date input limits should update when selecting not after you've dismissed the input

core bug

Most helpful comment

Still an issue in beta.17

All 8 comments

Same issue with beta 7 and 11.

Still an issue in beta.17

enabled selections are not being refreshed properly
In my experience, the performance of ion-datetime min and max parameters is very poor. I am trying to limit selection of date from "tomorrow" to "one year in the future". For instance min="2018-12-05" and max="2019-12-04".

  • if initial value is in 2019 - ion-datepicker allows me to select any month, even after I select year 2018 (it should be limited to 12th month only)
  • if initial value is in 2018, I can only select 12th month, even after I move to year 2019 (i should be able to select any month in 2019)

see #14233

It seems that this is not a duplicate of #14233, correct? So I define it as new issue

Indeed #14233 does not seem related to the minimum date settings

Hi there,

Thanks for the issue! I鈥檝e added this to issue #16630 to keep track of. We鈥檙e going to close out the individual issues and address all of the Datetime issues at once. We鈥檙e not forgetting about your issue, just trying to keep them all together.

Thanks for using Ionic!

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Macstyg picture Macstyg  路  3Comments

GeorgeAnanthSoosai picture GeorgeAnanthSoosai  路  3Comments

SebastianGiro picture SebastianGiro  路  3Comments

MrBokeh picture MrBokeh  路  3Comments

danbucholtz picture danbucholtz  路  3Comments