-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Do not allow non-dates being parsed as dates #3294
Conversation
This is just squashed #3288 |
This does not look like it would be a valid fix. I am hesitant to merge this, especially since I have a fix that will likely be merged later this week here. |
After thinking about this, instead of the new Date constructor, it would be fine to have the value set to null. A test would need to be added for this that it turns invalid date strings/objects into null - this should be accomplishable by essentially doing It also should not return undefined, but null IMO. The if-else conditional there can be refactored to then do only one return after $setValidity is called. This would also require testing. |
I'm moving this out of 0.13.0 milestone because:
|
@jmayday Please update your PR so it can be merged when the time comes. |
So, to wrap things up (because I'm little confused right now) - should we abandon this PR because of #3417 like @wesleycho suggested or should we keep it? (null approach also suggested by @wesleycho)? |
I removed code allowing values which do not match format being parsed as dates.