Skip to content

Commit

Permalink
fix(datetime-widget): revert default date format to include timezone (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
demshy committed Apr 3, 2024
1 parent c91a70f commit 46294d6
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions dev-test/backends/azure/config.yml
Expand Up @@ -30,6 +30,7 @@ collections:
- label: Publish Date
name: date
widget: datetime
format: 'YYYY-MM-DDTHH:mm'
- label: Description
name: description
widget: text
Expand Down
1 change: 1 addition & 0 deletions dev-test/backends/bitbucket/config.yml
Expand Up @@ -28,6 +28,7 @@ collections:
- label: Publish Date
name: date
widget: datetime
format: 'YYYY-MM-DDTHH:mm'
- label: Description
name: description
widget: text
Expand Down
1 change: 1 addition & 0 deletions dev-test/backends/git-gateway/config.yml
Expand Up @@ -27,6 +27,7 @@ collections:
- label: Publish Date
name: date
widget: datetime
format: 'YYYY-MM-DDTHH:mm'
- label: Description
name: description
widget: text
Expand Down
1 change: 1 addition & 0 deletions dev-test/backends/gitea/config.yml
Expand Up @@ -28,6 +28,7 @@ collections:
- label: Publish Date
name: date
widget: datetime
format: 'YYYY-MM-DDTHH:mm'
- label: Description
name: description
widget: text
Expand Down
1 change: 1 addition & 0 deletions dev-test/backends/github/config.yml
Expand Up @@ -28,6 +28,7 @@ collections:
- label: Publish Date
name: date
widget: datetime
format: 'YYYY-MM-DDTHH:mm'
- label: Description
name: description
widget: text
Expand Down
1 change: 1 addition & 0 deletions dev-test/backends/gitlab/config.yml
Expand Up @@ -28,6 +28,7 @@ collections:
- label: Publish Date
name: date
widget: datetime
format: 'YYYY-MM-DDTHH:mm'
- label: Description
name: description
widget: text
Expand Down
1 change: 1 addition & 0 deletions dev-test/backends/proxy/config.yml
Expand Up @@ -32,6 +32,7 @@ collections:
- label: Publish Date
name: date
widget: datetime
format: 'YYYY-MM-DDTHH:mm'
- label: Description
name: description
widget: text
Expand Down
2 changes: 1 addition & 1 deletion packages/decap-cms-widget-datetime/src/DateTimeControl.js
Expand Up @@ -64,7 +64,7 @@ class DateTimeControl extends React.Component {

getFormat() {
const { field } = this.props;
const format = field?.get('format') || 'YYYY-MM-DDTHH:mm';
const format = field?.get('format') || 'YYYY-MM-DDTHH:mm:ss.SSS[Z]';
const dateFormat = field?.get('date_format');
const timeFormat = field?.get('time_format');
let inputFormat = 'YYYY-MM-DDTHH:mm';
Expand Down

0 comments on commit 46294d6

Please sign in to comment.