Skip to content

Entries: Add deprecation warning to date method #43

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

Merged
merged 1 commit into from
Feb 17, 2018

Conversation

Arkni
Copy link
Member

@Arkni Arkni commented Feb 15, 2018

No description provided.

Copy link
Member

@staabm staabm left a comment

Choose a reason for hiding this comment

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

We should still mention why it is deprecated/why one should not use it

<desc>Makes the element require a date.</desc>
<longdesc>
Return true if the value is a valid date. Uses JavaScript's built-in Date to test if the date is valid, and therefore does no sanity checks. Only the format must be valid, not the actual date, eg 30/30/2008 is a valid date.
<p>This method should not be used, since it relies on the <code>new Date</code> constructor, which behaves very differently across browsers and locales. Use <code>dateISO</code> instead or one of the locale specific methods (in localizations/ and additional-methods.js).</p>
<p><strong>DEPRECATION warning:</strong></p>
<p style="font-style: italic;"><strong>This method is deprecated and will be removed in version <code>2.0.0</code>.<br/>Please don't use it, since it relies on the <code>Date</code> constructor, which behaves very differently across browsers and locales. Use <code>dateISO</code> instead or one of the locale specific methods (in localizations/ and additional-methods.js).</strong></p>
Copy link
Member Author

Choose a reason for hiding this comment

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

@staabm

Should I extend this explanation with some examples?
IMHO, I think this message suffice.

@staabm staabm merged commit 29e3a74 into jquery-validation:master Feb 17, 2018
@staabm
Copy link
Member

staabm commented Feb 17, 2018

Its fine thx

@Arkni Arkni deleted the date-method-deprecation branch February 17, 2018 11:35
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

Successfully merging this pull request may close these issues.

2 participants