File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
projects/bootstrapcomponents/src/calendar Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -132,15 +132,15 @@ export class ServoyBootstrapCalendar extends ServoyBootstrapBaseCalendar {
132132 super . pushUpdate ( ) ;
133133 }
134134
135- if ( ( event !== '' && ( ( this . minDate && this . minDate > event ) || ( this . maxDate && this . maxDate < event ) ) ) ||
136- /* 2024.12 fix */
137- event === undefined ||
138- /* lts_latest fix */
139- event . toString ( ) === 'Invalid Date' ) {
135+ if ( ( event !== '' && ( ( this . minDate && this . minDate > event ) || ( this . maxDate && this . maxDate < event ) ) ) || ! this . isValidDate ( event ) ) {
140136 // revert to old value
141137 this . svyFormat . writeValue ( this . dataProviderID ) ;
142138 }
143139 }
140+
141+ isValidDate ( date : any ) : boolean {
142+ return date instanceof Date && ! isNaN ( date . getTime ( ) ) ;
143+ }
144144
145145 public getNativeChild ( ) : any {
146146 return this . inputElementRef . nativeElement ;
You can’t perform that action at this time.
0 commit comments