ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

Type='Date' not working in IE

Open ghost opened this issue 11 years ago • 3 comments

We're currently using an editable date field in our project. The date picker pops up properly on Chrome and Firefox but noticed it doesn't work in IE (which is necessary for us). When editing the field, it acts as a regular text field in IE instead of displaying the date picker tab.

This is the field: { field: 'ApprovalDate', displayName: 'Approval Date', type: 'date', cellFilter: 'date:"yyyy-MM-dd"', width: 144 }

I searched and noticed the ones in this tutorial don't work in IE as well: http://ui-grid.info/docs/#/tutorial/201_editable

Also, is there any way to disable the "X" and the up/down icons when editing the date field. I've attached a screenshot showing what I'm talking about.

screen shot

ghost avatar Jan 20 '15 18:01 ghost

I don't believe this is an issue with ui-grid. The "date" type of html input tag is a new part of html5 and is not supported in IE or Firefox, currently. (It is odd to me that it works for you in Firefox as even in the latest beta release it is still not supported).

If you want a consistent experience across browsers, you should consider implementing your datepicker with jQuery or Angular-ui (ui-bootstrap).

Sources: http://www.w3schools.com/html/html_form_input_types.asp https://stackoverflow.com/questions/12455506/html5-input-type-date-color-range-support-in-firefox-and-internet-explorer https://stackoverflow.com/questions/22983013/how-to-get-html-5-input-type-date-working-in-firefox-and-or-ie-10 https://stackoverflow.com/questions/13955096/input-type-date-doesnt-work-in-ie

longshot5112 avatar Jan 20 '15 20:01 longshot5112

Gotcha. I'm still fairly new to angular so I assumed when defining type="date", it was using some pre-defined cell template that was set by ui-grid. I looked into using jQuery, but the grid is in a modal, so I had some challenges. I'll look into Angular-ui datepicker.

Thanks for the reply.

ghost avatar Jan 20 '15 20:01 ghost

Be careful here - there are a number of issues open related to this - #2279, #2321, #2196, #1785, #2290.

They all come down to that ui-grid uses native html5 editors and widgets, and not all browsers support these as yet. What would be nice would be to implement bootstrap widgets instead (as a feature), but that is actually kinda hard, and is why people haven't done it. Any new editor directive needs to honour the EDIT_START and other EDIT events - refer the edit tutorial that briefly mentions this, and look in the edit feature itself to see the directives that have been created for each of the edit widgets.

PaulL1 avatar Jan 20 '15 20:01 PaulL1