-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
return date object from date/datetime widgets if no format set
BREAKING CHANGE As of 1.0, the documented behavior for the date and datetime widgets was to always return a string value, but they were instead returning a date object if the default date was not manually changed by the user. This was addressed in #1143, but it became clear afterward that static site generators were depending on the raw date objects that Netlify CMS was unintentionally producing. Remaining as is or addressing the bug were both "breaking" states, so this commit reverts to producing raw date objects when no format is explicitly set. It is now considered an edge case to require string dates, as most static site generators expect to parse a raw date against formatting in a site's templates. Also note that this commit improves the original behavior by always providing a date object when no format is provided, even if the user manually changes the value.
- Loading branch information
Showing
4 changed files
with
28 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters