File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
services/static-webserver/client/source/class/osparc/ui/form Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -29,25 +29,23 @@ qx.Class.define("osparc.ui.form.DateTimeField", {
2929 maxHeight : 26
3030 } ) ;
3131
32- const now = new Date ( ) ;
33-
3432 // Date selector
35- const dateFormat = new qx . util . format . DateFormat ( "dd/MM/yyyy" ) ;
3633 this . __dateField = new qx . ui . form . DateField ( ) ;
34+ const dateFormat = new qx . util . format . DateFormat ( "dd/MM/yyyy" ) ;
3735 this . __dateField . setDateFormat ( dateFormat ) ;
38- this . __dateField . setValue ( now ) ;
3936 this . _add ( this . __dateField ) ;
4037
4138 // Hour selector
4239 this . __hourSpinner = new qx . ui . form . Spinner ( 0 , 12 , 23 ) ;
43- this . __hourSpinner . setValue ( now . getHours ( ) ) ;
4440 this . _add ( this . __hourSpinner ) ;
4541
4642 // Minute selector
4743 this . __minuteSpinner = new qx . ui . form . Spinner ( 0 , 0 , 59 ) ;
48- this . __minuteSpinner . setValue ( now . getMinutes ( ) ) ;
4944 this . _add ( this . __minuteSpinner ) ;
5045
46+ const now = new Date ( ) ;
47+ this . setValue ( now ) ;
48+
5149 // Sync changes back to value
5250 this . __dateField . addListener ( "changeValue" , this . __updateValue , this ) ;
5351 this . __hourSpinner . addListener ( "changeValue" , this . __updateValue , this ) ;
You can’t perform that action at this time.
0 commit comments