Skip to content

Commit

Permalink
Small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
thecalcc committed Jan 22, 2025
1 parent 2a2db5e commit 4b4a76a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions scripts/apps/authoring-react/fields/datetime/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ export class Preview extends React.PureComponent<IProps> {
label={gettext('Date time (AUTHORING-REACT)')}
onChange={noop}
preview={true}
value={(() => {
const {value} = this.props;
const parsedVal = value != null && (value.length > 0) ? new Date(value) : null;

return parsedVal;
})()}
value={this.props.value}
disabled={this.props.config.readOnly}
width={this.props.config.width}
/>
Expand Down
2 changes: 1 addition & 1 deletion scripts/core/superdesk-api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ declare module 'superdesk-api' {

// AUTHORING-REACT FIELD TYPES - datetime

export type IDateTimeValueOperational = Date | null; // ISO 8601, 13:59:01.123
export type IDateTimeValueOperational = Date | null;
export type IDateTimeValueStorage = IDateTimeValueOperational;
export interface IDateTimeFieldConfig extends ICommonFieldConfig {
allowSeconds?: boolean;
Expand Down

0 comments on commit 4b4a76a

Please sign in to comment.