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

Separate date and time editing functionalities from igxDatePicker and igxTimePicker into a new directive #6271

Closed
38 of 42 tasks
damyanpetev opened this issue Dec 3, 2019 · 1 comment · Fixed by #6923
Closed
38 of 42 tasks
Assignees

Comments

@damyanpetev
Copy link
Member

damyanpetev commented Dec 3, 2019

  • Update Date Editor Spec
  • Mask Refactoring Mask refactoring #6454
  • Update Mask Editor Spec
  • Implementation & Unit tests
    • I want to able display date/time values based on defined formats (display value and edit value; all defined masks, like shortDate/longDate & custom format)
      • Implementation - move to date-editor.common - util functions and pipes.
      • Unit tests - copy existing tests from date-picker/time-picker and create new.
    • I want to able to spin date/time parts
      • Implementation
      • Unit tests - copy existing tests from time-picker and create new for date-picker.
    • I want to edit date/time values in the editor
      • Implementation
      • Unit tests
    • I want to be able to set minValue & maxValue
    • I want to be able to use date-editor in Template Form and Reactive Form
      • Implementation
      • Unit tests
    • I want have customizable prompt chars
      • Implementation
      • Unit tests
    • I want have placeholder text
      • Implementation
      • Unit tests
    • I want to complete partialy entered dates
      • Implementation
      • Unit tests
    • I want to clear any invalid input
      • Implementation
      • Unit tests
    • Other inputs, outputs & methods
      • Implementation
      • Unit tests
  • Demos Dev
    • Separate Demo for date editor
    • Update existing Reactive Form the demo and add date editor
    • Add demo for Template Driven Form with editor components
  • Topic and Samples

Is your feature request related to a problem? Please describe.

Right now there's a standalone Mask input, but no alternative for Date input.
Functionality for this exists inside the Date Picker, however it's not exposed. Further, this leads to re-templated pickers being stuck with reduced functionality (see Retemplated Dropdown Date Picker) and isn't reusable by other components (e.g. Date Range)

Looking at angular/angular#8203 we might want to look into supporting type "date" and "datetime-local"

Describe the solution you'd like

Ideally a directive that can handle Date (perhaps and time) input (extending from igxMask) and Model binding (ValueAccessor), potentially supporting native date input types as well.

Describe alternatives you've considered

See SO links below. Those don't look clean in API or always work well TBH.

Additional context

Date input is especially painful, since dates usually require formatting which means a separation of value and display text and there's definitely room for improvement here as seen in multiple SO questions:
https://stackoverflow.com/questions/37055311/angular2-how-to-use-javascript-date-object-with-ngmodel-two-way-binding
https://stackoverflow.com/questions/38175251/angular-2-date-input-not-binding-to-date-value
All of those deal with trying to format the Date as string and somehow parse it back with varying success.

@Lipata Lipata assigned jackofdiamond5 and unassigned Lipata and radomirchev Dec 16, 2019
@jackofdiamond5 jackofdiamond5 added 🛠️ status: in-development Issues and PRs with active development on them and removed 🆕 status: new labels Dec 20, 2019
@StefanIvanov StefanIvanov self-assigned this Jan 6, 2020
@jackofdiamond5 jackofdiamond5 changed the title Separate date editing functionality from igxDatePicker into a new directive Separate date and time editing functionalities from igxDatePicker and igxTimePicker into a new directive Jan 13, 2020
@Lipata
Copy link
Member

Lipata commented Jan 16, 2020

Issue #6286 about min and max values are added to the specification. When confirmed as a component's functionality in the specification we can close #6286.

jackofdiamond5 added a commit that referenced this issue Mar 16, 2020
- ngModel binding
- value spinning
- min/max range
- dev demo (initial)
- Unit tests for spinning; isSpinLoop
@jackofdiamond5 jackofdiamond5 added ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged. and removed 🛠️ status: in-development Issues and PRs with active development on them labels Mar 18, 2020
Lipata added a commit that referenced this issue Apr 14, 2020
Lipata added a commit that referenced this issue Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants