IgniteUI / ignite-ui

Ignite UI for jQuery by Infragistics

Home Page:https://bit.ly/2kuu1fT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

In igDateEditor with the intput and display format of HH:mm:ss.fff, millisecond part becomes 0 in display text and in value when the focus is blurred.

norikois opened this issue · comments

Description

In igDateEditor with the intput and display format of HH:mm:ss.fff, millisecond part becomes 0 in text and in value when the focus is blurred.

  • ignite-ui version: 18.2, 19.1, 19.2
  • browser: IE11 only

Steps to reproduce

  1. Open the attached sample in IE11.
  2. Type any value, for example, 12:34:56.789, in igDateEditor and click "OK" button.

Result

When the focus moves to the button, the display text of the millisecond part in the igDateEditor becomes 000.
And it is also 0 in the value as shown in the alert window.

Expected result

The millisecond part should be 789 both in display text and in value.

Attachments

CAS-32292-Sample1 (2).zip

Some Additional Notes

It would be greatly appreciated if there is a workaround for v17.2.

The value is parsed from the mask correctly and converted to a Date with the correct milliseconds, however at the point of updating the actual editor value for some reason we do an additional conversion. As a bonus, the conversion is done using the Date constructor to parse the value or keep it if it's already a date.
However, in ES5 (read IE11) that "keep" is done through string conversion and is only accurate to the seconds (see https://stackoverflow.com/a/32364944).
Issue is in the editors _getDateObjectFromValue method.