2

I am using Webshim to standardise datepickers cross-browser. That's great, but unfortunately it also replaces other form elements, which I am not interested in.

Is there a way I can limit webshim/forms-ext to only replace the UI of the date picker - and leave all other input elements as is?

webshim.setOptions( 'forms-ext', {
    loadStyles: false,
    replaceUI: 'auto',
    types: 'date'
});
Nix
  • 5,746
  • 4
  • 30
  • 51

1 Answers1

0

Yes, your code looks right but I seem to remember always having issues with using setOptions that way. Here is how I have it set up in my application.

webshim.setOptions({
    enhanceAuto: true,
    loadStyles: false,
    "forms-ext": {
        replaceUI: "auto",
        types: "date",
        "date": {
            "startView": 2
        }
    }});
webshim.polyfill('forms-ext');
Meuryc
  • 1
  • 1