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

igx-date-picker and igx-time-picker doesn't handle required properly #6471

Closed
kdinev opened this issue Jan 15, 2020 · 1 comment · Fixed by #6722 or #6877
Closed

igx-date-picker and igx-time-picker doesn't handle required properly #6471

kdinev opened this issue Jan 15, 2020 · 1 comment · Fixed by #6722 or #6877
Assignees
Labels
💥 severity: critical 🐛 bug Any issue that describes a bug 🕐 time-picker 📅 date-picker version: 8.2.x version: 9.0.x version: 9.1.x ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.

Comments

@kdinev
Copy link
Member

kdinev commented Jan 15, 2020

Description

The HTML validation doesn't pass through the igx-date and time pickers properly. Required doesn't put asterisk in the label, no red borders when touched and invalid, etc.

  • igniteui-angular version: 8.2.14
  • browser: all

Steps to reproduce

  1. Create a date picker and mark it required.
<igx-date-picker label="Start Date"
                 name="startDate"
                 required
                 [(ngModel)]="tournament.StartDate">
</igx-date-picker>

Result

No visual indication in the component that it's required in the form.

Expected result

To behave like other form components.

@Lipata
Copy link
Member

Lipata commented Jan 17, 2020

Added to the igxDateTimeEditorDirective specification.

@wnvko wnvko self-assigned this Feb 5, 2020
@wnvko wnvko added 🛠️ status: in-development Issues and PRs with active development on them 💥 severity: critical and removed 🧨 severity: medium labels Feb 5, 2020
@wnvko wnvko 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 Feb 17, 2020
wnvko added a commit that referenced this issue Feb 19, 2020
If we drop down the calendar when input has no value,
onBlur gets called but we do not call onTouchCallback
which is correct. However if after we click outside the
input the model is never validated. This is why we
should validate model, in this case, and in onClosing event.
wnvko added a commit that referenced this issue Mar 5, 2020
If we drop down the calendar when input has no value,
onBlur gets called but we do not call onTouchCallback
which is correct. However if after we click outside the
input the model is never validated. This is why we
should validate model, in this case, and in onClosing event.
wnvko added a commit that referenced this issue Mar 5, 2020
wnvko added a commit that referenced this issue Mar 5, 2020
# Conflicts:
#	projects/igniteui-angular/src/lib/time-picker/time-picker.component.ts
wnvko added a commit that referenced this issue Mar 5, 2020
wnvko added a commit that referenced this issue Mar 5, 2020
# Conflicts:
#	projects/igniteui-angular/src/lib/date-picker/date-picker.component.ts

# Conflicts:
#	projects/igniteui-angular/src/lib/date-picker/date-picker.component.ts
wnvko added a commit that referenced this issue Mar 5, 2020
# Conflicts:
#	projects/igniteui-angular/src/lib/date-picker/date-picker.component.spec.ts
wnvko added a commit that referenced this issue Mar 5, 2020
# Conflicts:
#	projects/igniteui-angular/src/lib/time-picker/time-picker.component.ts

# Conflicts:
#	projects/igniteui-angular/src/lib/time-picker/time-picker.component.ts
wnvko added a commit that referenced this issue Mar 5, 2020
If we drop down the calendar when input has no value,
onBlur gets called but we do not call onTouchCallback
which is correct. However if after we click outside the
input the model is never validated. This is why we
should validate model, in this case, and in onClosing event.

# Conflicts:
#	projects/igniteui-angular/src/lib/time-picker/time-picker.component.ts
wnvko added a commit that referenced this issue Mar 5, 2020
# Conflicts:
#	projects/igniteui-angular/src/lib/test-utils/ui-interactions.spec.ts
wnvko added a commit that referenced this issue Mar 5, 2020
wnvko added a commit that referenced this issue Mar 5, 2020
# Conflicts:
#	projects/igniteui-angular/src/lib/time-picker/time-picker.component.ts

# Conflicts:
#	projects/igniteui-angular/src/lib/time-picker/time-picker.component.ts
wnvko added a commit that referenced this issue Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💥 severity: critical 🐛 bug Any issue that describes a bug 🕐 time-picker 📅 date-picker version: 8.2.x version: 9.0.x version: 9.1.x ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.
Projects
None yet
4 participants