Deprecation warning: value provided is not in a recognized RFC2822 or ISO format

See original GitHub issue
Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
Arguments: 
[0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: 06/30/2017, _f: undefined, _strict: undefined, _locale: [object Object]

This issue happens due to: https://github.com/edgycircle/ember-pikaday/blob/master/addon/mixins/pikaday.js#L121

We should use the format value that’s passed in as a value if set. Or, we should start requiring people specify a format since this functionality will eventually be removed if not in RFC2822 or ISO date format.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:20
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

29reactions
talha08commented, Aug 4, 2018

use like this Moment(new Date(date)).format('MM/DD/YYYY')

21reactions
krishanjangircommented, Jul 28, 2018

Below works for me to remove RFC2822 warnings

Use moment(String, FormatString) to convert string to date.

 var newDt = Moment(this.state.dob,"MM/DD/YY")

And below code from date to String

var dt = Moment(newDt).format("YYYY-MM-DD") 

By this way it will not show warning messages.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deprecation warning in Moment.js - Not in a recognized ISO ...
The docs say: This deprecation warning is thrown when no known format is found for a date passed into the string constructor. To...
Read more >
value provided is not in a recognized RFC2822 or ISO format.
This is not an error, it's just a warning, which tells you what is not supported anymore in the next momentjs update. You...
Read more >
Moment.js - Deprecation warning - Coding Help - Glitch Support
Deprecation warning : value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is...
Read more >
Deprecation warning in Moment.js - Not in a recognized ISO ...
JavaScript : Deprecation warning in Moment.js - Not in a recognized ISO format [ Gift : Animated Search Engine : https://bit.ly/AnimSearch ] ...
Read more >
value provided is not in a recognized rfc2822 or iso format ...
deprecation warning : value provided is not in a recognized rfc2822 or iso format. moment construction falls back to js date(), which is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found