File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ describe('isDateConditionValid', () => {
225225 '2023-02-23T00:00:00 NY' ,
226226 '2023-02-23 NY' ,
227227 ] ,
228- invalid : [ 'blah' , '2023-02-23' ] ,
228+ invalid : [ 'blah' , '2023-02-23' , '2023-02-23T00:00:00 NY blah' ] ,
229229 empty : '' ,
230230 undefined,
231231 } ;
Original file line number Diff line number Diff line change @@ -718,7 +718,10 @@ export function isDateConditionValid(condition: DateCondition, value?: string) {
718718 return true ;
719719
720720 default : {
721- const [ dateTimeString , tzCode ] = ( value ?? '' ) . split ( ' ' ) ;
721+ const [ dateTimeString , ...rest ] = ( value ?? '' ) . split ( ' ' ) ;
722+ // Reconstitute all tokens after the first ' ' in case the user included garbage data at the end
723+ // e.g. '2020-01-01 NY blah'
724+ const tzCode = rest . join ( ' ' ) ;
722725
723726 try {
724727 DateUtils . parseDateTimeString ( dateTimeString ) ;
You can’t perform that action at this time.
0 commit comments