Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
- force a TLS time format for the Time widget #2221
Browse files Browse the repository at this point in the history
  • Loading branch information
siemiatj committed Mar 27, 2019
1 parent fccbb37 commit c674d19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/components/widget/DatePicker.js
Expand Up @@ -109,6 +109,8 @@ class DatePicker extends Component {
);

render() {
const format = this.state.open ? true : this.props.timeFormat;

return (
<div tabIndex="-1" onKeyDown={this.handleKeydown} className="datepicker">
<TetheredDateTime
Expand All @@ -122,6 +124,7 @@ class DatePicker extends Component {
onFocusInput={this.focusInput}
closeOnSelect={false}
{...this.props}
timeFormat={format}
/>
<i className="meta-icon-calendar" key={0} />
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/widget/RawWidget.js
Expand Up @@ -8,7 +8,7 @@ import NumericInput from './NumericQuickInput';
import { RawWidgetPropTypes, RawWidgetDefaultProps } from './PropTypes';
import { getClassNames, generateMomentObj } from './RawWidgetHelpers';
import { allowShortcut, disableShortcut } from '../../actions/WindowActions';
import { DATE_FORMAT } from '../../constants/Constants';
import { DATE_FORMAT, DATE_FIELD_FORMATS } from '../../constants/Constants';
import ActionButton from './ActionButton';
import Attributes from './Attributes/Attributes';
import Checkbox from './Checkbox';
Expand Down Expand Up @@ -434,7 +434,7 @@ export class RawWidget extends Component {
<div className={this.getClassNames({ icon: true })}>
<DatePicker
field={fields[0].field}
timeFormat={true}
timeFormat={DATE_FIELD_FORMATS.Time}
dateFormat={false}
inputProps={{
placeholder: fields[0].emptyText,
Expand Down

0 comments on commit c674d19

Please sign in to comment.