What if i dont want ISO date format when using custom format at moment.js
See original GitHub issueWhen using owl-date-time picker with custom format the value which is validated with moment.js should be in format YYYY-MM-DD due to this code.
var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4}-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/;
At line: 2161(the second "-"character in regex does not allow to have different format like “/” or “*”).
What if the date format at the class in .ts file is different like: YYYY/MM/DD
When converting to different format the value on view is removed (I know what is causing all this problem in present code) but i wanted to know a feasible solution for this.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
How do I format a date as ISO 8601 in moment.js?
toISOString converts to a Date object, sets to UTC then uses the native Date prototype function to output ISO8601 in UTC with milliseconds...
Read more >Docs - Moment.js
We may choose to not accept corrections to locale strings or localized date formats, especially if they have been argued successfully for their...
Read more >How to format dates without Moment.js - Dawntraoz
In this post I want to tell you how I got rid of the moment library when I found new alternatives with smaller,...
Read more >Javascript Dates Manipulation with Date-fns - Section.io
Date locale; Time zones; Date arithmetic; Date comparisons, and other important applications of date-fns functions. Date Format. Date formatting ...
Read more >How to Format Date in JavaScript with Moment.JS
If you are including the script in HTML, the moment object will be available globally, so you do not have to import it....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Do not show image, show the actual app link.
As I got from your images, you may did this wrong.
You have to provide your custom formats like this:
OK, thanks.