Q: How to specify the longDateFormat.L on a isValid() check?
karlkras opened this issue · 1 comments
karlkras commented
so according to the documentation you can do this:
moment('02/22/2019', 'MM/DD/YYYY', true).isValid();
and this works just fine...
However,
what I'd rather prefer to be able to do is:
moment('02/22/2019', 'L', true).isValid();
Or use some localizable method that doesn't include having to hardcode the format like this.
marwahaha commented
Thanks for opening this request.
This is a great question for Stack Overflow.