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

Datepicker not validating input correctly #3835

Closed
fuelmx opened this issue Jun 18, 2015 · 4 comments
Closed

Datepicker not validating input correctly #3835

fuelmx opened this issue Jun 18, 2015 · 4 comments

Comments

@fuelmx
Copy link

fuelmx commented Jun 18, 2015

I found a situation where Datepicker module does not validate input field. I'm using dd.MM.yyyy format as an example and this can be reproduced in https://angular-ui.github.io/bootstrap/#/datepicker

First I change input value 18.06.2015 to 1A8.06.2015 and datepicker correctly informs me that this is invalid value. But if I take the A away it does not validate input field until I remove the first 1. And if I start with 8.06.2015 => A8.06.2015 => 8.06.2015 it works correctly.

@Srogozins
Copy link

I think, I might have found a related issue that is also reproduceable in https://angular-ui.github.io/bootstrap/#/datepicker on Firefox 38, but not on Firefox 32 or Chrome. If A single digit is deleted from a month or day field in the first popup example, the console log will throw out this:

Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.

This will also seemingly break the model binding, no future changes to the input's value will affect the model until page reload.

@yoorek
Copy link

yoorek commented Jun 24, 2015

I also noticed the same problem and here is demo: http://jsfiddle.net/yoorek/mug2e381/

I can change anything in correct date and it's marked $invalid PERMANENTLY

@wesleycho
Copy link
Contributor

This appears to be a duplicate of #3713

@wesleycho wesleycho modified the milestones: Backlog, 0.13.1 (Performance) Jun 27, 2015
@wesleycho wesleycho modified the milestones: 0.13.1 (npm), 0.13.2 (Performance) Jul 23, 2015
@wesleycho wesleycho modified the milestones: 0.13.2 (1.4 support), 0.13.3 (Performance) Aug 2, 2015
@wesleycho
Copy link
Contributor

This appears to have been fixed in master in the past couple of days - 0.13.2 should fix all of the issues here.

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

5 participants