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

IgxTimePickerComponent, igxHint customization #8665

Closed
luiscla27 opened this issue Dec 1, 2020 · 1 comment · Fixed by #9160
Closed

IgxTimePickerComponent, igxHint customization #8665

luiscla27 opened this issue Dec 1, 2020 · 1 comment · Fixed by #9160

Comments

@luiscla27
Copy link

luiscla27 commented Dec 1, 2020

Is your feature request related to a problem?

I want to customize an <igx-hint> of <igx-time-picker> so I can add custom validation messages, currently it seems the only way to do that is to use an igxTimePickerTemplate.

The problem is that igxTimePickerTemplate overrides some of your predefined behaviours defined by InteractionMode (for my use case I want to keep the numbers validation and the scrolldown wheel for dropdown mode)

Describe the solution you'd like

Expose the directive igxHint so the hint can be passed directly (like igxLabel already is)

<igx-time-picker format="hh:mm tt" name="end" [mode]="'dropdown'">
  <label igxLabel>End time</label>
  <igx-hint ig class="text-danger" *ngIf="form.controls.end.touched && form.controls.end.hasError('ShouldBeGreater')">
      End time should be greater than start time
  </igx-hint>
</igx-time-picker>

Describe alternatives you've considered

Currently as workaround I'm doing this:

<div [class.igx-input-group--invalid]="form.controls.end.touched && form.controls.end.hasError('ShouldBeGreater')">
  <igx-time-picker format="hh:mm tt" name="end" [mode]="'dropdown'">
      <label igxLabel>End time</label>>
  </igx-time-picker>
  <div class="igx-input-group__hint" *ngIf="form.controls.end.touched && form.controls.end.hasError('ShouldBeGreater')">
    <igx-hint class="error-hint">
      End time should be greater than start time
    </igx-hint>
  </div>
</div>
@luiscla27 luiscla27 changed the title igx-time-picker customization igx-time-picker, igxHint customization Dec 1, 2020
@luiscla27 luiscla27 changed the title igx-time-picker, igxHint customization IgxTimePickerComponent, igxHint customization Dec 1, 2020
@github-actions
Copy link

There has been no recent activity and this issue has been marked inactive.

@github-actions github-actions bot added the status: inactive Used to stale issues and pull requests label Feb 15, 2021
@Lipata Lipata removed the status: inactive Used to stale issues and pull requests label Feb 22, 2021
@Lipata Lipata reopened this Feb 22, 2021
@Lipata Lipata mentioned this issue Apr 14, 2021
14 tasks
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.

4 participants