ADM-dateTimePicker icon indicating copy to clipboard operation
ADM-dateTimePicker copied to clipboard

Typing Date in Input sets wrong date on Firefox

Open irackley-mc opened this issue 8 years ago • 2 comments

When typing in a date manually on Firefox, the date is set to 1 day before your input. For example, if you type 1-14-14 as mm-dd-yy for the datepicker, it is updated to 1-13-14 on blur.

This did not happen in the 1.0 version and is due to a bug with new date creation on Firefox vs Chrome.

irackley-mc avatar Feb 07 '17 14:02 irackley-mc

Are you sure? I test what you said in this Plunker But didn't see any problem!

MeTe-30 avatar Feb 17 '17 12:02 MeTe-30

Just did some additional testing and it looks like it is reproducible for any timezone before/left of GMT. This can be tested by setting the system clock on your PC to a timezone such as Eastern Standard Time, (UTC-5) and then reopening Firefox and using the datepicker. You might have to fully close and then reopen Firefox for the timezone change to go into effect.

I also think an easy fix so far is simply replacing the hyphen '-' in dtp_toDate with a forward slash '/', but it'll require some additional testing. For some reason firefox treats those 2 different and only cares about the timezone for one of those instances.

irackley-mc avatar Feb 17 '17 17:02 irackley-mc