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 {
286286 this . valueChanged ( ) ;
287287 } }
288288 theme = { theme }
289+ value = { this . defaultValue ? this . convertStringToDate ( this . defaultValue ) : undefined }
289290 componentRef = { ( input ) => { this . refControl = input ; } }
290291 />
291292 </ ThemeProvider > ;
@@ -362,6 +363,12 @@ export class FluentUIDateInput extends Input {
362363 const value = new Date ( this . _value . getTime ( ) - ( offset * 60 * 1000 ) ) ;
363364 return value . toISOString ( ) . split ( 'T' ) [ 0 ] ;
364365 }
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+ }
365372 else {
366373 return undefined ;
367374 }
You can’t perform that action at this time.
0 commit comments