Merge "DateTimeInputWidget: Set type before calling parent constructor"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 18 Apr 2016 21:36:16 +0000 (21:36 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 18 Apr 2016 21:36:16 +0000 (21:36 +0000)
resources/src/mediawiki.widgets.datetime/DateTimeInputWidget.js

index 7f36137..01d3442 100644 (file)
@@ -55,6 +55,9 @@
                        config.formatter.format = '@' + config.type;
                }
 
+               // Early properties
+               this.type = config.type;
+
                // Parent constructor
                mw.widgets.datetime.DateTimeInputWidget[ 'super' ].call( this, config );
 
@@ -64,7 +67,6 @@
                OO.ui.mixin.PendingElement.call( this, config );
 
                // Properties
-               this.type = config.type;
                this.$handle = $( '<span>' );
                this.$fields = $( '<span>' );
                this.fields = [];