1. Date time control not working on firefox.

2. Replace moment with date-fns in date time control as date-fns is more maintained.

Fixes #6816
This commit is contained in:
Aditya Toshniwal
2021-09-29 13:43:05 +05:30
committed by Akshay Joshi
parent d753719891
commit 332351efaf
5 changed files with 86 additions and 58 deletions

View File

@@ -95,13 +95,13 @@ export class ExceptionsSchema extends BaseUISchema {
{
id: 'jexdate', cell: 'datetimepicker', label: gettext('Date'),
type: 'datetimepicker',
controlProps: { format: 'YYYY-MM-DD', placeholder: gettext('<any>'),
controlProps: { placeholder: gettext('<any>'),
autoOk: true, pickerType: 'Date',
},
}, {
id: 'jextime', cell: 'datetimepicker', label: gettext('Time'),
type: 'datetimepicker',
controlProps: { format: 'HH:mm', placeholder: gettext('<any>'),
controlProps: { placeholder: gettext('<any>'),
autoOk: true, pickerType: 'Time', ampm: false,
},
}
@@ -289,13 +289,13 @@ export default class PgaJobScheduleSchema extends BaseUISchema {
id: 'jscenabled', label: gettext('Enabled?'), type: 'switch', cell: 'switch',
}, {
id: 'jscstart', label: gettext('Start'), type: 'datetimepicker', cell: 'datetimepicker',
controlProps: { format: 'YYYY-MM-DD HH:mm:ss Z', ampm: false,
controlProps: { ampm: false,
placeholder: gettext('YYYY-MM-DD HH:mm:ss Z'), autoOk: true,
disablePast: true,
},
}, {
id: 'jscend', label: gettext('End'), type: 'datetimepicker', cell: 'datetimepicker',
controlProps: { format: 'YYYY-MM-DD HH:mm:ss Z', ampm: false,
controlProps: { ampm: false,
placeholder: gettext('YYYY-MM-DD HH:mm:ss Z'), autoOk: true,
disablePast: true,
},

View File

@@ -100,7 +100,8 @@ export default class RoleSchema extends BaseUISchema {
mode: ['properties', 'edit', 'create'],
deps: ['rolcanlogin'],
helpMessage: gettext('Please note that if you leave this field blank, then password will never expire.'),
controlProps: { format: 'YYYY-MM-DD HH:mm:ss Z', ampm: false,
controlProps: {
ampm: false,
placeholder: gettext('No Expiry'), autoOk: true,
},
disabled: obj.readOnly,