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

ui: date-range-picker - add support for ControlValueAccessor, MatFormFieldControl and Validator #1197

Closed
SuperITMan opened this issue Mar 15, 2019 · 0 comments · Fixed by #1258

Comments

@SuperITMan
Copy link
Member

SuperITMan commented Mar 15, 2019

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[X] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/NationalBankBelgium/stark/blob/master/CONTRIBUTING.md#got-a-question-or-problem

Current behavior

The date-range-picker component is restrictive to use and not intuitive enough comparing to all @angular/material components.

The developer cannot :

  • use [(ngModel)]
  • use [formControl] (we can use [dropdownFormControl]
  • manage errors himself
  • manage hints himself

Expected behavior

The date-range-picker component should be usable like the @angular/material components.

<mat-form-field>
  <stark-date-range-picker [formControl]="formControl" [startMaxDate]="startMaxDate" [endMaxDate]="endMaxDate"></stark-date-range-picker>
  <mat-error>Error !</mat-error>
  <mat-hint>Hint</mat-hint>
</mat-form-field>

We did already this for the date-picker component: #1178

What is the motivation / use case for changing the behavior?

Standardize our components to what is already proposed by Angular Material.

@SuperITMan SuperITMan added this to the 10.0.0-beta.7 milestone Mar 15, 2019
@carlo-nomes carlo-nomes self-assigned this Apr 4, 2019
carlo-nomes added a commit to carlo-nomes/stark that referenced this issue Apr 17, 2019
… component

  - provide functionality for displaying errors
  - added example
  - added test

ISSUES CLOSED: NationalBankBelgium#1197
carlo-nomes added a commit to carlo-nomes/stark that referenced this issue Apr 17, 2019
… component

  - provide functionality for displaying errors
  - added example
  - added test

ISSUES CLOSED: NationalBankBelgium#1197
carlo-nomes added a commit to carlo-nomes/stark that referenced this issue Apr 17, 2019
… component

  - provide functionality for displaying errors
  - added example
  - added test

ISSUES CLOSED: NationalBankBelgium#1197
carlo-nomes added a commit to carlo-nomes/stark that referenced this issue Apr 17, 2019
… component

  - provide functionality for displaying errors
  - added example
  - added test

ISSUES CLOSED: NationalBankBelgium#1197
carlo-nomes added a commit to carlo-nomes/stark that referenced this issue Apr 17, 2019
… component

  - provide functionality for displaying errors
  - update stark-date-pickers with two way binding
  - added example
  - added/updated test

ISSUES CLOSED: NationalBankBelgium#1197
carlo-nomes added a commit to carlo-nomes/stark that referenced this issue Apr 23, 2019
… component

  - provide functionality for displaying errors
  - update stark-date-pickers with two way binding
  - added example
  - added/updated test

ISSUES CLOSED: NationalBankBelgium#1197
carlo-nomes added a commit to carlo-nomes/stark that referenced this issue Apr 23, 2019
… component

  - provide functionality for displaying errors
  - update stark-date-pickers with two way binding
  - added example
  - added/updated test

ISSUES CLOSED: NationalBankBelgium#1197
carlo-nomes added a commit to carlo-nomes/stark that referenced this issue Apr 24, 2019
… component

  - provide functionality for displaying errors
  - update stark-date-pickers with two way binding
  - added example
  - added/updated test

ISSUES CLOSED: NationalBankBelgium#1197
carlo-nomes added a commit to carlo-nomes/stark that referenced this issue Apr 24, 2019
… component

  - provide functionality for displaying errors
  - update stark-date-pickers with two way binding
  - added example
  - added/updated test

ISSUES CLOSED: NationalBankBelgium#1197
carlo-nomes added a commit to carlo-nomes/stark that referenced this issue Apr 24, 2019
… component

  - provide functionality for displaying errors
  - update stark-date-pickers with two way binding
  - added example
  - added/updated test

ISSUES CLOSED: NationalBankBelgium#1197
carlo-nomes added a commit to carlo-nomes/stark that referenced this issue Apr 24, 2019
… component

  - provide functionality for displaying errors
  - update stark-date-pickers with two way binding
  - added example
  - added/updated test

ISSUES CLOSED: NationalBankBelgium#1197
carlo-nomes added a commit to carlo-nomes/stark that referenced this issue Apr 25, 2019
… component

  - provide functionality for displaying errors
  - update stark-date-pickers with two way binding
  - added example
  - added/updated test

ISSUES CLOSED: NationalBankBelgium#1197
carlo-nomes added a commit to carlo-nomes/stark that referenced this issue Apr 25, 2019
… component

  - provide functionality for displaying errors
  - update stark-date-pickers with two way binding
  - added example
  - added/updated test

ISSUES CLOSED: NationalBankBelgium#1197
carlo-nomes added a commit to carlo-nomes/stark that referenced this issue Apr 25, 2019
… component

  - provide functionality for displaying errors
  - update stark-date-pickers with two way binding
  - added example
  - added/updated test

ISSUES CLOSED: NationalBankBelgium#1197
carlo-nomes added a commit to carlo-nomes/stark that referenced this issue Apr 25, 2019
… component

  - provide functionality for displaying errors
  - update stark-date-pickers with two way binding
  - added example
  - added/updated test

ISSUES CLOSED: NationalBankBelgium#1197
carlo-nomes added a commit to carlo-nomes/stark that referenced this issue Apr 26, 2019
… component

  - provide functionality for displaying errors
  - update stark-date-pickers with two way binding
  - added example
  - added/updated test

ISSUES CLOSED: NationalBankBelgium#1197
carlo-nomes added a commit to carlo-nomes/stark that referenced this issue Apr 30, 2019
… component

  - provide functionality for displaying errors
  - update stark-date-pickers with two way binding
  - added example
  - added/updated test

ISSUES CLOSED: NationalBankBelgium#1197
carlo-nomes added a commit to carlo-nomes/stark that referenced this issue Apr 30, 2019
… component

  - provide functionality for displaying errors
  - update stark-date-pickers with two way binding
  - added example
  - added/updated test

ISSUES CLOSED: NationalBankBelgium#1197
carlo-nomes added a commit to carlo-nomes/stark that referenced this issue Apr 30, 2019
… component

  - provide functionality for displaying errors
  - update stark-date-pickers with two way binding
  - added example
  - added/updated test

ISSUES CLOSED: NationalBankBelgium#1197
christophercr pushed a commit to carlo-nomes/stark that referenced this issue May 3, 2019
… component

  - provide functionality for displaying errors
  - update stark-date-pickers with two way binding
  - added example
  - added/updated test

ISSUES CLOSED: NationalBankBelgium#1197

BREAKING CHANGES: `stark-date-range-picker` is now implemented as a ControlValueAccessor to better integrate with Angular Forms:

  - new `rangeFormGroup` input to provide the start and end date form
  controls. You can handle validations and error messages via those form
  controls.
  - new `required` input to mark the control as required
  and display the required asterisk '*' in the start/end date pickers
  (same as with the `stark-date-picker`).
  - the `isDisabled` input has been renamed to `disabled`. If you use
  the new `rangeFormGroup` input to provide your start/end date form controls, then you should disable/enable those form
  controls directly yourself instead of using the `disabled` input.
christophercr pushed a commit to carlo-nomes/stark that referenced this issue May 14, 2019
… component

  - provide functionality for displaying errors
  - update stark-date-pickers with two way binding
  - added example
  - added/updated test

ISSUES CLOSED: NationalBankBelgium#1197

BREAKING CHANGES: `stark-date-range-picker` is now implemented as a ControlValueAccessor to better integrate with Angular Forms:

  - new `rangeFormGroup` input to provide the start and end date form
  controls. You can handle validations and error messages via those form
  controls.
  - new `required` input to mark the control as required
  and display the required asterisk '*' in the start/end date pickers
  (same as with the `stark-date-picker`).
  - the `isDisabled` input has been renamed to `disabled`. If you use
  the new `rangeFormGroup` input to provide your start/end date form controls, then you should disable/enable those form
  controls directly yourself instead of using the `disabled` input.
christophercr pushed a commit to carlo-nomes/stark that referenced this issue May 14, 2019
… component

  - provide functionality for displaying errors
  - update stark-date-pickers with two way binding
  - added example
  - added/updated test

ISSUES CLOSED: NationalBankBelgium#1197

BREAKING CHANGES: `stark-date-range-picker` is now implemented as a ControlValueAccessor to better integrate with Angular Forms:

  - new `rangeFormGroup` input to provide the start and end date form
  controls. You can handle validations and error messages via those form
  controls.
  - new `required` input to mark the control as required
  and display the required asterisk '*' in the start/end date pickers
  (same as with the `stark-date-picker`).
  - the `isDisabled` input has been renamed to `disabled`. If you use
  the new `rangeFormGroup` input to provide your start/end date form controls, then you should disable/enable those form
  controls directly yourself instead of using the `disabled` input.
christophercr pushed a commit to carlo-nomes/stark that referenced this issue May 14, 2019
… component

  - provide functionality for displaying errors
  - update stark-date-pickers with two way binding
  - added example
  - added/updated test

ISSUES CLOSED: NationalBankBelgium#1197

BREAKING CHANGES: `stark-date-range-picker` is now implemented as a ControlValueAccessor to better integrate with Angular Forms:

  - new `rangeFormGroup` input to provide the start and end date form
  controls. You can handle validations and error messages via those form
  controls.
  - new `required` input to mark the control as required
  and display the required asterisk '*' in the start/end date pickers
  (same as with the `stark-date-picker`).
  - the `isDisabled` input has been renamed to `disabled`. If you use
  the new `rangeFormGroup` input to provide your start/end date form controls, then you should disable/enable those form
  controls directly yourself instead of using the `disabled` input.
christophercr pushed a commit to carlo-nomes/stark that referenced this issue May 20, 2019
… component

  - provide functionality for displaying errors
  - update stark-date-pickers with two way binding
  - added example
  - added/updated test

ISSUES CLOSED: NationalBankBelgium#1197

BREAKING CHANGES: `stark-date-range-picker` is now implemented as a ControlValueAccessor to better integrate with Angular Forms:

  - new `rangeFormGroup` input to provide the start and end date form
  controls. You can handle validations and error messages via those form
  controls.
  - new `required` input to mark the control as required
  and display the required asterisk '*' in the start/end date pickers
  (same as with the `stark-date-picker`).
  - the `isDisabled` input has been renamed to `disabled`. If you use
  the new `rangeFormGroup` input to provide your start/end date form controls, then you should disable/enable those form
  controls directly yourself instead of using the `disabled` input.
christophercr pushed a commit to carlo-nomes/stark that referenced this issue May 27, 2019
… component

  - provide functionality for displaying errors
  - update stark-date-pickers with two way binding
  - added example
  - added/updated test

ISSUES CLOSED: NationalBankBelgium#1197

BREAKING CHANGES: `stark-date-range-picker` is now implemented as a ControlValueAccessor to better integrate with Angular Forms:

  - new `rangeFormGroup` input to provide the start and end date form
  controls. You can handle validations and error messages via those form
  controls.
  - new `required` input to mark the control as required
  and display the required asterisk '*' in the start/end date pickers
  (same as with the `stark-date-picker`).
  - the `isDisabled` input has been renamed to `disabled`. If you use
  the new `rangeFormGroup` input to provide your start/end date form controls, then you should disable/enable those form
  controls directly yourself instead of using the `disabled` input.
christophercr pushed a commit to carlo-nomes/stark that referenced this issue May 27, 2019
… component

  - provide functionality for displaying errors
  - update stark-date-pickers with two way binding
  - added example
  - added/updated test

ISSUES CLOSED: NationalBankBelgium#1197

BREAKING CHANGES: `stark-date-range-picker` is now implemented as a ControlValueAccessor to better integrate with Angular Forms:

  - new `rangeFormGroup` input to provide the start and end date form
  controls. You can handle validations and error messages via those form
  controls.
  - new `required` input to mark the control as required
  and display the required asterisk '*' in the start/end date pickers
  (same as with the `stark-date-picker`).
  - the `isDisabled` input has been renamed to `disabled`. If you use
  the new `rangeFormGroup` input to provide your start/end date form controls, then you should disable/enable those form
  controls directly yourself instead of using the `disabled` input.
christophercr pushed a commit to carlo-nomes/stark that referenced this issue May 27, 2019
… component

  - provide functionality for displaying errors
  - update stark-date-pickers with two way binding
  - added example
  - added/updated test

ISSUES CLOSED: NationalBankBelgium#1197

BREAKING CHANGES: `stark-date-range-picker` is now implemented as a ControlValueAccessor to better integrate with Angular Forms:

  - new `rangeFormGroup` input to provide the start and end date form
  controls. You can handle validations and error messages via those form
  controls.
  - new `required` input to mark the control as required
  and display the required asterisk '*' in the start/end date pickers
  (same as with the `stark-date-picker`).
  - the `isDisabled` input has been renamed to `disabled`. If you use
  the new `rangeFormGroup` input to provide your start/end date form controls, then you should disable/enable those form
  controls directly yourself instead of using the `disabled` input.
christophercr pushed a commit to carlo-nomes/stark that referenced this issue May 27, 2019
… component

  - provide functionality for displaying errors
  - update stark-date-pickers with two way binding
  - added example
  - added/updated test

ISSUES CLOSED: NationalBankBelgium#1197

BREAKING CHANGES: `stark-date-range-picker` is now implemented as a ControlValueAccessor to better integrate with Angular Forms:

  - new `rangeFormGroup` input to provide the start and end date form
  controls. You can handle validations and error messages via those form
  controls.
  - new `required` input to mark the control as required
  and display the required asterisk '*' in the start/end date pickers
  (same as with the `stark-date-picker`).
  - the `isDisabled` input has been renamed to `disabled`. If you use
  the new `rangeFormGroup` input to provide your start/end date form controls, then you should disable/enable those form
  controls directly yourself instead of using the `disabled` input.
christophercr pushed a commit to carlo-nomes/stark that referenced this issue May 28, 2019
… component

  - provide functionality for displaying errors
  - update stark-date-pickers with two way binding
  - added example
  - added/updated test

ISSUES CLOSED: NationalBankBelgium#1197

BREAKING CHANGES: `stark-date-range-picker` is now implemented as a ControlValueAccessor to better integrate with Angular Forms:

  - new `rangeFormGroup` input to provide the start and end date form
  controls. You can handle validations and error messages via those form
  controls.
  - new `required` input to mark the control as required
  and display the required asterisk '*' in the start/end date pickers
  (same as with the `stark-date-picker`).
  - the `isDisabled` input has been renamed to `disabled`. If you use
  the new `rangeFormGroup` input to provide your start/end date form controls, then you should disable/enable those form
  controls directly yourself instead of using the `disabled` input.
christophercr pushed a commit to carlo-nomes/stark that referenced this issue May 28, 2019
… component

  - provide functionality for displaying errors
  - update stark-date-pickers with two way binding
  - added example
  - added/updated test

ISSUES CLOSED: NationalBankBelgium#1197

BREAKING CHANGES: `stark-date-range-picker` is now implemented as a ControlValueAccessor to better integrate with Angular Forms:

  - new `rangeFormGroup` input to provide the start and end date form
  controls. You can handle validations and error messages via those form
  controls.
  - new `required` input to mark the control as required
  and display the required asterisk '*' in the start/end date pickers
  (same as with the `stark-date-picker`).
  - the `isDisabled` input has been renamed to `disabled`. If you use
  the new `rangeFormGroup` input to provide your start/end date form controls, then you should disable/enable those form
  controls directly yourself instead of using the `disabled` input.
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.

2 participants