-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Alias with datetime and long months is not working properly #2751
Comments
@stsrki , Not yet implemented :) |
Any change it could be done in a timely manner? Ps. Would you be interested in working on contractor basis for this, and any future requests? |
Working on contract basis is not that simple as just saying yes, .... a donation can change priorities ;-) Anyway, I did a first attempt for the implementation. |
Will do :) Anyways. There are still some issue.
|
Also see #2277 |
@stsrki , |
I've tried v5.0.9-beta.45, but unfortunately, the same errors are still happening. |
Can you remove the placeholder property and try the long datetime mmmm/dd/yyyy |
I didn't tested the first issue yet. |
Are you sure you are using the latest version? Can you create a codepen or fiddle. |
Yes, I have downloaded the latest version. Also, I cleared the cache to make sure the latest files are being used.
Give me some time to do so. |
Directly try with 5.0.9-beta.46, this fixes the first issue. |
Can confirm the first issue is now fixed 🎉 |
Hello @RobinHerbots Since this is the continuation of the same feature, I don't think there is a need to open a new issue. Input masks now mostly work, except for the long formats. However, the main issue that we got reported by the users is that the edit mask is case-sensitive. For example: Works if you type in for 7th July 1967, 07 Jul 1967 or 7 Jul 1967 But not 07 JUL 1967 or 07 jul 1967 Seems the month name is case-sensitive. it's hard to get the user to type Jul in the correct case (capital J, lowercase ul). PS. the contractor offer is still open if you're willing to do so. Otherwise, donations are also OK but it gets complicated when paying with the company. |
Strange, using inputFormat: dd mmm yyyy seems to accept Jul jul JUL even jUL JuL, ... UX wise this is not good, For the long datetime format, I know exactly what is the problem, but I still need to find the time to figure, how to deal with that. |
Well, from the regular user perspective, they should not bother with writing the exact title-cased names. So making it case-insensitive would be the best way forward. To have it accept any value, Jul jul JUL, etc. |
Hi @stsrki , I did some fixes for the long date format. Can you have a try with the latest beta. Best regards, |
Hello, sorry for not responding sooner. I was out of the town. Anyway, I tried the new version, and I don't think it still works. Here are my observations. (Image for context)
|
Grr, I forgot to remove the console .log ;-) Ok I tested with dd mmmm yyyy, there it should work ok, when using mmmm dd yyyy indeed I see the problem. |
@stsrki , Tadaa, another attempt v5.0.9-beta.53 |
Can you have a try with this codepen. https://codepen.io/robinherbots/pen/VwNbmNP Btw when using the colormask.js, you also need to include the colormask.css (and it is still experimental, .... awaiting some feedback, from someone, ...) |
The codepen seems to work.
Is this why the text shows bellow the input? I can review it, just let me know the details.
|
Maybe not just yet. While the codepen works it is really basic example so I went to see what is different from my code. With only Just use this on codepen and you will see it: Inputmask("datetime", {
inputFormat: "mmmm/dd/yyyy",
placeholder: "mmmm/dd/yyyy",
}).mask("input"); |
Yes, true. To be able to handle the dynamic length in the long date format the placeholder is generated based on the inputformat, but this only happens when not providing a placeholder of your own. The best approach will be ignoring the provided placeholder in this case. Or is there a case for a custom input placeholder in the datetime alias? I will currently ignore when using the long date format. |
In our project, developers can define the placeholders as they wish. So there is a need for it to work along with |
@stsrki , Version 5.0.9-beta.67 can handle custom placeholders for the datetime alias. Can you have a try. |
I can confirm this is now working properly 🎉 @RobinHerbots, thank you for not giving up! |
I'm not sure if this is a bug or if I am missing something.
I have a simple mask with the following options.
The input is rendered as following
For some reason, the year part is lost completely, and the month part is moved from the center to the far right. Notice the dots in the middle. Does anyone know what might be wrong here?
User version: 5.0.9-beta.35
The text was updated successfully, but these errors were encountered: