Materialize: Time picker: AM not available on IE11

Created on 30 Jan 2019  路  1Comment  路  Source: Dogfalo/materialize

When using the time picker with everything as default and no extra parameters, the AM option is not available on IE 11.

You can see this in action by going to https://materializecss.com/pickers.html#time-picker in IE 11 and clicking Lunchtime.

I did find https://github.com/Dogfalo/materialize/issues/4931 bug, however it is fromm 2017 and states it has been fixed. I believe all my code is newer than that so I'm curious how I can implement this fix, or even a short term fix on my existing code.

Most helpful comment

I experienced the same bug in IE 11. Ideally this bug will be resolved, but below is the fix I used. I included the "onOpenStart" callback in the instance options to replace the AM button div's inner content (should have already been 'AM') to 'AM'.

onOpenStart: function(el) {
    var amDiv = el.querySelector('.am-btn');
    amDiv.innerText = 'AM';
 }

I tested it in IE 10/11, and no resulting issues in FF.

>All comments

I experienced the same bug in IE 11. Ideally this bug will be resolved, but below is the fix I used. I included the "onOpenStart" callback in the instance options to replace the AM button div's inner content (should have already been 'AM') to 'AM'.

onOpenStart: function(el) {
    var amDiv = el.querySelector('.am-btn');
    amDiv.innerText = 'AM';
 }

I tested it in IE 10/11, and no resulting issues in FF.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

samybob1 picture samybob1  路  3Comments

lpgeiger picture lpgeiger  路  3Comments

artur99 picture artur99  路  3Comments

PhillippOhlandt picture PhillippOhlandt  路  3Comments

MickaelH974 picture MickaelH974  路  3Comments