Skip to content

Commit

Permalink
fix: format
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjagodic committed Aug 7, 2024
1 parent febbc22 commit cd604d8
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions packages/decap-cms-widget-datetime/src/DateTimeControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class DateTimeControl extends React.Component {
const { format, inputFormat } = this.getFormat();

if (value?.replace(/\s+/g, '') === '{{now}}') {
return this.isUtc ? dayjs.utc().format(inputFormat) : dayjs().format(inputFormat)
return this.isUtc ? dayjs.utc().format(inputFormat) : dayjs().format(inputFormat);
}

const inputValue = this.isUtc
Expand Down Expand Up @@ -154,10 +154,14 @@ class DateTimeControl extends React.Component {
disabled={isDisabled}
/>
{this.isUtc && (
<span css={css`
font-size: 0.8em;
color: #666;
`}>UTC</span>
<span
css={css`
font-size: 0.8em;
color: #666;
`}
>
UTC
</span>
)}
{!isDisabled && (
<Buttons
Expand Down

0 comments on commit cd604d8

Please sign in to comment.