fix: deprecate inconsistent config param case (#4172)

This commit is contained in:
andreascm
2020-08-31 19:25:48 +08:00
committed by GitHub
parent f1376aa5c3
commit 88a5a8098e
31 changed files with 409 additions and 144 deletions

View File

@ -24,9 +24,9 @@ export default class DateTimeControl extends React.Component {
// dateFormat and timeFormat are strictly for modifying
// input field with the date/time pickers
const dateFormat = field.get('dateFormat');
const dateFormat = field.get('date_format');
// show time-picker? false hides it, true shows it using default format
let timeFormat = field.get('timeFormat');
let timeFormat = field.get('time_format');
if (typeof timeFormat === 'undefined') {
timeFormat = true;
}
@ -46,7 +46,7 @@ export default class DateTimeControl extends React.Component {
getPickerUtc() {
const { field } = this.props;
const pickerUtc = field.get('pickerUtc');
const pickerUtc = field.get('picker_utc');
return pickerUtc;
}

View File

@ -1,8 +1,8 @@
export default {
properties: {
format: { type: 'string' },
dateFormat: { oneOf: [{ type: 'string' }, { type: 'boolean' }] },
timeFormat: { oneOf: [{ type: 'string' }, { type: 'boolean' }] },
pickerUtc: { type: 'boolean' },
date_format: { oneOf: [{ type: 'string' }, { type: 'boolean' }] },
time_format: { oneOf: [{ type: 'string' }, { type: 'boolean' }] },
picker_utc: { type: 'boolean' },
},
};