-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Date Control Regression #1210
Conversation
Deploy preview for netlify-cms-www ready! Built with commit a294937 |
Deploy preview for cms-demo ready! Built with commit a294937 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checking 😄
this.format = field.get('format') || (includeTime ? DEFAULT_DATETIME_FORMAT : DEFAULT_DATE_FORMAT); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tech4him1 any reason in constructor rather than in componentWillMount
I would have to test, but I would think the format could change from one collection to the next right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The format can change between collections.
Can you explain when componentWillMount
should be used versus constructor
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may have made a bad assumption here. I thought we were talking about state changes 😛
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My assumption was incorrect, sorry for not looking closer first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works as expected.
this.format = field.get('format') || (includeTime ? DEFAULT_DATETIME_FORMAT : DEFAULT_DATE_FORMAT); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My assumption was incorrect, sorry for not looking closer first.
Fix regression from b7fcb8b. Dates were disappearing completely until the field was clicked into.
- Summary
Fix regression from b7fcb8b. Dates were disappearing completely until the field was clicked into.
- Test plan
Manually tested using
datetime
widget.- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)