Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

When an input name is specified, the "date-disabled" validation is not applied to the named input control #3438

Closed
Asvarduil opened this issue Mar 25, 2015 · 2 comments

Comments

@Asvarduil
Copy link

Reproduction Plunker can be found here

Steps to Reproduce:

Open the reproduction plunker linked above.

Observe that there are two 'text-danger' labels set to appear if an error object exists for the testText field on the testForm form.

In the plunker, manually enter a value less than the min-date, or greater than the max-date (test values used: 01/01/1900, 01/01/2100)

Observe that the validation label for the field with message, "Date is outside of the valid range" does not appear.

Observe that the validation label for the form with message, "Should not see this error." does appear.

Observe in the paragraph "Form Error Dicitionary Blob", that a date-disabled validation error exists, but the $name property of the single error object consists of an empty string.

Observed Results:

The form-level validation message in the reproduction plunker is shown

The control-level validation message is not visible

The Form Error dictionary blob has a single instance of the date-disabled error, with an empty string as the name of the throwing control.

Expected Results:

In the reproduction plunker, the form-level validation message should be hidden.

The control-level validation message should be visible.

If a name attribute exists for the input on which the datepicker is set, then if a model value is outside of the given date range, the corresponding date-disabled validation error should have $name being the name of that control.

@wesleycho
Copy link
Contributor

Noting that this is still an issue here.

It looks like we don't have a mechanism to bubble up the validation error from the model in the datepicker directive to the popup's input.

This is a completely missing feature.

@wesleycho
Copy link
Contributor

I did some research on this in the past couple of weeks - I believe we cannot do anything about this, as the input's validation is for the user to control.

Going to close this as won't support.

On a side note, love your gravatar, although X is better IMO :P .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants