Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation warning: #195

Closed
jwright04 opened this issue May 25, 2016 · 1 comment
Closed

Deprecation warning: #195

jwright04 opened this issue May 25, 2016 · 1 comment

Comments

@jwright04
Copy link

I see this was addressed here:
#140

But when using the following

validator('date', {
after: 'now',
before: '1/1/2020',
precision: 'day',
format: 'M/D/YYY',
errorFormat: 'M/D/YYY'
})

I'm seeing the Deprecation warning again:

Deprecation warning: moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to moment/moment#1407 for more info.
Arguments: [object Object]

Anything I can do to resolve this warning?

@offirgolan
Copy link
Collaborator

@jwright04 I have a PR pending with some date format issues but I wasnt able to recreate your issue. Im assuming this is because M/D/YYY is not a valid date format according to momentjs docs which is probably why its reverting back to js Date.

screen shot 2016-05-25 at 1 33 20 pm

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

No branches or pull requests

2 participants