0

If i use webshim to enhance firefox with a datepicker, i have some problems with dynamic content: if i change the type of the input, webshim does not update the widget itself. if i use the method updatePolyfill the widget will not be replaced, but added to the input.

    var $input = this.$ele.find("input");        
    $input.attr("placeholder", this.options.placeholder.value);
    $input.attr("name", inputName);
    $input.attr("type",this.options.datatype.value);

a date input looks like there are not 1 datepicker icon, but 1 for every update call.

enter image description here

Benjamin Eckstein
  • 884
  • 2
  • 9
  • 19

1 Answers1

1

toggle the webshim element

var $input = this.$ele.find("input"); 
$input.attr("type","date");
$input.updatePolyfill()
$('.ws-date').show();$input.hide()

When the type changes,

$('.ws-date').hide();$input.show()
Mem Maina
  • 19
  • 3