diff --git a/src/ui/ElementStyler.js b/src/ui/ElementStyler.js index 402bedd..bc7f35f 100644 --- a/src/ui/ElementStyler.js +++ b/src/ui/ElementStyler.js @@ -153,18 +153,6 @@ module.exports = Class( 'ElementStyler', : val; }, - 'datalist': function( value, ref_id ) - { - var val = this._selectData[ref_id][value]; - - // return the string associated with the given value - // (the text for the option), or the given value if it does not - // exist - return ( val === undefined ) - ? value - : val; - }, - 'dateTime': function( value ) { var ret_val = new Date( ( +value ) * 1000 ); @@ -403,9 +391,9 @@ module.exports = Class( 'ElementStyler', { var $element = this.getElementByName( name, index, null, $context ); - // if the provided question is not a select or a datalist, then we cannot add options + // if the provided question is not a select, then we cannot add options // to it---use the first index instead - if ( ! [ 'select', 'datalist' ].includes( this._getElementType( name ) ) ) + if ( this._getElementType( name ) !== 'select' ) { $element.val( ( options[ 0 ] || { value: '' } ).value ); return; diff --git a/src/validate/standardBucketValidator.js b/src/validate/standardBucketValidator.js index c031cee..97d5427 100644 --- a/src/validate/standardBucketValidator.js +++ b/src/validate/standardBucketValidator.js @@ -44,7 +44,6 @@ module.exports = function( type_map ) city: formatter.CityFormatter, currency: formatter.CurrencyFormatter(), 'float': formatter.FloatFormatter, - datalist: Base.use( formatter.Number )(), date: formatter.FullDateFormatter, dollars: formatter.DollarFormatter(), manualDate: formatter.FullDateFormatter, @@ -74,14 +73,14 @@ module.exports = function( type_map ) .use( formatter.MultiDimension( '; ' ) )(), // no validators for these (yet) - select: formatter.VoidFormatter, - noyes: formatter.VoidFormatter, - radio: formatter.VoidFormatter, - legacyradio: formatter.VoidFormatter, - text: formatter.VoidFormatter, - explain: formatter.VoidFormatter, - dateTime: formatter.VoidFormatter, - waitable: formatter.VoidFormatter, + select: formatter.VoidFormatter, + noyes: formatter.VoidFormatter, + radio: formatter.VoidFormatter, + legacyradio: formatter.VoidFormatter, + text: formatter.VoidFormatter, + explain: formatter.VoidFormatter, + dateTime: formatter.VoidFormatter, + waitable: formatter.VoidFormatter, /* TODO:*/ state: formatter.VoidFormatter,