File tree Expand file tree Collapse file tree 4 files changed +10
-3
lines changed
pages/settings/components/general-settings/datetime-formatter Expand file tree Collapse file tree 4 files changed +10
-3
lines changed Original file line number Diff line number Diff line change
1
+ import { DATETIME_FORMATTER_DEFAULT } from './keys'
2
+
1
3
export const dateTimeOptions = [
2
- { inputDisplay : 'HH:mm:ss.SSS d MMM yyyy' , value : 'HH:mm:ss.SSS d MMM yyyy' } ,
4
+ { inputDisplay : DATETIME_FORMATTER_DEFAULT , value : DATETIME_FORMATTER_DEFAULT } ,
3
5
{ inputDisplay : 'yyyy-MM-dd HH:mm:ss.sss' , value : 'yyyy-MM-dd HH:mm:ss.sss' } ,
4
6
{ inputDisplay : 'dd-MMM-yyyy HH:mm:ss.SSS' , value : 'dd-MMM-yyyy HH:mm:ss.SSS' } ,
5
7
{ inputDisplay : 'dd.MM.yyyy HH:mm:ss' , value : 'dd.MM.yyyy HH:mm:ss' }
Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ export enum KeyValueFormat {
151
151
DateTime = 'DateTime' ,
152
152
}
153
153
154
- export const DATETIME_FORMATTER_DEFAULT = 'HH:mm:ss.SSS d MMM yyyy'
154
+ export const DATETIME_FORMATTER_DEFAULT = 'HH:mm:ss d MMM yyyy'
155
155
156
156
export enum KeyValueCompressor {
157
157
GZIP = 'GZIP' ,
Original file line number Diff line number Diff line change @@ -84,7 +84,9 @@ const DatetimeForm = ({ onFormatChange }: Props) => {
84
84
85
85
const handleFormatCheck = ( format = formik . values . format ) => {
86
86
const { valid, error : errorMsg } = checkDateTimeFormat ( format )
87
- if ( ! valid ) {
87
+ if ( format . length > 50 ) {
88
+ setError ( 'Format should not exceed 50 characters' )
89
+ } else if ( ! valid ) {
88
90
setError ( errorMsg || 'This format is not supported' )
89
91
onFormatChange ?.( 'Invalid Format' )
90
92
} else {
Original file line number Diff line number Diff line change 20
20
background-color : var (--euiPageBackgroundColor );
21
21
padding : 4px ;
22
22
margin-left : 4px ;
23
+ overflow-x : hidden ;
24
+ text-overflow : ellipsis ;
25
+ max-width : 330px ;
23
26
}
You can’t perform that action at this time.
0 commit comments