File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
src/controls/adaptiveCardHost/fluentUI Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -286,6 +286,7 @@ export class FluentUIDateInput extends Input {
286
286
this . valueChanged ( ) ;
287
287
} }
288
288
theme = { theme }
289
+ value = { this . defaultValue ? this . convertStringToDate ( this . defaultValue ) : undefined }
289
290
componentRef = { ( input ) => { this . refControl = input ; } }
290
291
/>
291
292
</ ThemeProvider > ;
@@ -362,6 +363,12 @@ export class FluentUIDateInput extends Input {
362
363
const value = new Date ( this . _value . getTime ( ) - ( offset * 60 * 1000 ) ) ;
363
364
return value . toISOString ( ) . split ( 'T' ) [ 0 ] ;
364
365
}
366
+ else if ( this . defaultValue ) {
367
+ const date = this . convertStringToDate ( this . defaultValue ) ;
368
+ const offset = date . getTimezoneOffset ( ) ;
369
+ const value = new Date ( date . getTime ( ) - ( offset * 60 * 1000 ) ) ;
370
+ return value . toISOString ( ) . split ( 'T' ) [ 0 ] ;
371
+ }
365
372
else {
366
373
return undefined ;
367
374
}
You can’t perform that action at this time.
0 commit comments