Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ion-datetime issues with properties: min max displayFormat pickerFormat #8729

Closed
ecureuill opened this issue Oct 16, 2016 · 5 comments
Closed
Assignees
Milestone

Comments

@ecureuill
Copy link

Short description of the problem:

Add displayFormat or pickerFormat attribute led to:

  1. miss day column in picker and don't fill the day in display.
  2. if pickerFormat is YYYY and displayFormat is not defined, display value show ,YYYY

Add max attribute with a date less than current date lead to

  1. Miss month & year column in picker if max attr value less then (current date - 101)
  2. Miss month column in picker if max attr value less then current date & greater then (current date - 100)After scroll in picker or select a date, missed column appear.

Add min attribute lead to:

  1. Miss month & year column in picker if min attr value greater then current year
  2. Miss month column in picker if min attr value is today, yesterday or tomorrow. After scroll in picker or select a date, missed column appear.

What behavior are you expecting?

  1. Set any valid format to displayFormat or pickerFormat must not break the component
  2. If pickerFormat is defined and displayFormat is not defined, displayFormat should be set to same format as pickerFormat
  3. If max attr value is defined, min attr value is not defined and max attr value is less then default minimum value (current date - 100 years), then min value should be set to the year of defined max value attr to avoid issues
  4. If in attr value is defined, max attr value is not defined and in attr value is greater then default maximum value (current year), then max value should be set to the year of defined min value attr to avoid issues

Other information:
Tested in chrome

Which Ionic Version? 1.x or 2.x
2 RC1

Plunker that shows an example of your issue

http://embed.plnkr.co/MjdZ0n/

Run ionic info from terminal/cmd prompt: (paste output below)

Cordova CLI: 6.3.1
Gulp version: CLI version 3.9.1
Gulp local:
Ionic Framework Version: 2.0.0-rc.1
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
OS: Distributor ID: Debian Description: Debian GNU/Linux 8.6 (jessie)
Node Version: v6.6.0

@adamdbradley
Copy link
Contributor

adamdbradley commented Nov 15, 2016

@ecureuill Working on this now. The example where it's missing a day, the format for day is uppercase DD, so that's why dd isn't working, and I'd rather not add code which is an alias for the same thing. http://ionicframework.com/docs/v2/api/components/datetime/DateTime/

@devarg
Copy link

devarg commented Nov 15, 2016

@adamdbradley do you know if there will be any performance improvements for date picker on android devices? At least on Moto X Pure Marshmallow, date picker rolls glitchy and slow. If you haven't experienced this we may open another issue to work it out. Thanks! :)

@adamdbradley
Copy link
Contributor

@devarg yes, @manucorporat just completed a refactor that addressed many of it's issues. fc2ee64 It'll be in the next release.

@adamdbradley
Copy link
Contributor

Thanks for the help @ecureuill! A few more unit tests were added to fix this bugs, thanks!

@devarg
Copy link

devarg commented Nov 15, 2016

@adamdbradley , epic. <ion-infinite> thanks

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants