iamkun / iamkun/dayjs

Warn the user of missing customParseFormat import

Open
#609 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
48.7k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
When the user does not import the customParseFormat module, they get "invalid date" when trying to parse using a custom format.

**Expected behavior**
An error message is shown or thrown: Custom format parsing is implemented in a separate module. Please include this in your build. (import customParseFormat from 'dayjs/plugin/customParseFormat')

**Information**
- Day.js Version 1.8.14
- OS: Win10
- Browser Chrome 74
- Time zone: GMT+2

Example:
https://codepen.io/bertyhell/pen/PvgvKR?editors=1011

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.