-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[12.0.0+] Incorrect date format conversion on input #9681
Comments
Inform ZD (29687) |
Another example for this case Screen.Recording.2022-07-18.at.15.59.33.mov |
edit: Okey, it's probably about I've checked the code and it seems that: a) default handsontable/src/validators/dateValidator.js Lines 46 to 62 in f4c2ca0
Upgraded |
I don't think so. I can see the same problem without I think the problem is that Pikaday transforms the input before closing the editor. On this line, Pikaday chooses
Why is this a problem starting from 12.0, I don't know. Maybe something has changed in the editor closing code. |
I'll check that. |
True.
The below Pikaday's code changes how date look like after closing the editor. Maybe it's related to introducing https://github.com/Pikaday/Pikaday/blob/21f676e70d688d18b265f2c12fc38e8457c20645/pikaday.js#L595 |
@adrianszymanski89 @warpech I've created a workaround, but I assume that fix should be provided in a different place. It corrects incorrect behavior of using Pikaday's method, not the cause of the problem. Workaround: https://jsfiddle.net/pqn910ju/ |
It seems that there are two bugs:
Sep-06-2022.17-16-38.mp4
The first problem has been fixed by commit: 824ab4e. The
edit: It seems that method works properly. |
I've found extra problem related to flickering while entering data by copy+paste and flickering.mp4I'll restore mechanism which has been working up to version |
@wszymanski, I believe you closed the issue by accident 😄 The issue should be closed by the support team after the fix is released and confirmed that it works. |
Sure, thanks. It has been closed automatically, after merging the PR. It probably happened after using the word "fixed". |
This issue will be fixed by v12.1.3 |
Issue closed as fixed in Handsontable v12.1.3 |
Description
When we have
dateFromat
set toMM/DD/YY
and we input, for example - 7/1/22 in the cell, it is incorrectly converted to01/07/2022
. It used to be converted correctly in Handsontable v. 11.1.0 (before updating moment.js dependency #9381)Steps to reproduce
Demo
V 11.1.0 (works correctly) - https://jsfiddle.net/aszymanski/nqv3btc0/1/
V 12.0.0 (and higher, it's broken) - https://jsfiddle.net/aszymanski/nqv3btc0/2/
Your environment
The text was updated successfully, but these errors were encountered: