Skip to content
This repository was archived by the owner on Feb 18, 2022. It is now read-only.

Conversation

@batiskafff
Copy link
Contributor

Don`t update value if user enter invalid date.

Don`t update value if user enter invalid date.
, unregisterDataSetWatcher = $scope.$watch('dateSet', function dateSetWatcher(newValue) {

if (newValue) {
if (newValue && !isNaN(Date.parse(newValue))) {
Copy link
Member

@45kb 45kb Jan 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@batiskafff does it fails if you remove isNaN() ?
i really believe isNaN is not necessary but i could mistake actually...

@45kb 45kb merged commit ca2dc47 into 720kb:master Jan 20, 2017
@45kb
Copy link
Member

45kb commented Jan 20, 2017

you can now update to 2.1.12 https://github.com/720kb/angular-datepicker/releases/tag/2.1.12 and get all your changes!

thanks @batiskafff have a nice day

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants