Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Invalid md-datepicker does not invalidate form #5581

Closed
laberle opened this issue Nov 5, 2015 · 2 comments
Closed

Invalid md-datepicker does not invalidate form #5581

laberle opened this issue Nov 5, 2015 · 2 comments
Assignees

Comments

@laberle
Copy link

laberle commented Nov 5, 2015

Using md-min-date and md-max-date disallow picking dates when using the datepicker, but typing an invalid date into the input box does not invalidate the form.

screenshot from 2015-11-05 14 14 02

Basically just used the demo code and added a button.
Codepen: http://codepen.io/anon/pen/xwaJvQ

<md-content>
    <form name="myForm">
      <md-datepicker name="dateField" ng-model="myDate" 
        required="true"
        md-min-date="minDate" 
        md-max-date="maxDate">
      </md-datepicker>     
      <md-button class="md-raised" ng-disabled="myForm.$invalid">Submit Form</md-button>
    </form>
  </md-content>
@ngraef
Copy link
Contributor

ngraef commented Nov 9, 2015

Duplicate of #4926. This is fixed in v1.0.0-rc3 and master.

@jelbourn
Copy link
Member

Thanks for the dupe reference!

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

No branches or pull requests

3 participants