The igxDatePicker changes the time portion of a provided date
Description
The igxDatePicker sets the time portion of it's value to 12:00.
- igniteui-angular version: 6.1.4
- browser: N/A
Steps to reproduce
- Open the Dev Samples
- Go to DatePicker -> Date Picker with retemplated input group.
- Observe the time, which displays the current hour and minutes.
- Change the Date.
Result
The time is reset to 12:00.
Expected result
The time should not be reset.
Since JavaScript does not support Date only object, we use 12:00 as a default time portion in our code.
Our igxDatePicker operates with the date only and does not guarantee the passed time portion will remain the same after manipulation. I agree altering the time portion can be considered a side effect, but then again, when getting the value from our picker, only the date portion should be taken into account. After all, it's called igxDatePicker.
@rkaraivanov could decide whether we should implement this enhancement or close this issue as not a bug.
@tiliev there was the same issue with the igxTimePicker #2470, which did not keep the Date, and is now fixed. If you have the igxTimePicker and the igxDatePicker in the same application, you should be able to bind the date/ time between them without altering it.