-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Mask support for Calendar #1426
Comments
After this issue will be resolved, we'll consider switching from Wijmo to PrimeNG. As of now we use both. |
In our enterprise environment, we currently use another third-party mask plugin (angular2-text-mask) in tandem with the PrimeNG calendar control. While we've managed to make this work, the solution is not ideal and often introduces bugs that are difficult to resolve. An option on the PrimeNG calendar to apply an input mask would be much appreciated. It might be even more ideal if the PrimeNG input mask was just a dynamic directive that could be applied to either native inputs or other PrimeNG components, including the calendar/datepicker. |
@Da13Harris I added a issue that describe your request. |
anyone found a solution for this issue ? |
👍 |
if anyone found solution for this issue then please share it with me . |
👍 |
so noth no changed? |
👍 |
Is this planned for any release? |
I'm already getting negative feedback from my company about the calendars' lack of an input mask. Please add this feature! |
Is it possible to have a feedback to know if this "new feature" is planned or not ? |
I did a paleative solution without a third-party mask plugin using the event the component send. My code is fresh, so it needs to be worked out. I did the algoritm by intercepting the input element (event.path[0]):
I know that is not a good looking solution, but maybe it could help some one. |
Any updated on this issue? @cagataycivici |
👍 |
@icarodebarros This did help me - I just had to change event.path[0] to event.target because only Chrome supports path currently as it is not standard. I also did not need to use the blur event. |
Any news about this? |
Nothing about this yet?? |
this is so annoying. should be a standard. |
I'm missing this feature. It really needs to be standard. |
found out why it's so hard to set a calendar mask. got to build a directive based on the inputMask to use on the pCalendar. |
Many users find it impractical to have to select a date in the calendar, they want to type on the keyboard when using the mouse, and this is really true. I think it would be a question of usability to think (@cagataycivici), for now I have created a method to use the inputMask with the validation of the user input: Component:
HTML:
IN FORM OR USE NGMODULE:
obs: use moment.js to format and valid dates ... |
I've made one lib for masking, one of the first things that i built was a directive for primeng calendar. it's quite simple and solve most of the directive problems, if anyone find anything that could improve it, this is the github link :) https://github.com/shogogan/racoon-mask it has two directives, but the main one here is the usage: |
Just informing that i changed the mask lib name (racoon-lib to racoon-mask). and it is working pretty better (with a early stage of a showcase to try on while testing) And I put it on version 1.0.0 right now. 😄 still needs some improvements, but by now it's working on android/ios chrome/ie10 Any issue just report or open a PR :) |
Thank you so much for your work. I'm using the rPCalendarMask directive but cannot get As this sample shows for phone number, when the user selects the input, I would like for the I'm using racoon-mask-primeng version 1.1.11. It would be very helpful if you can create a demo of this. Thank you again. |
Hey @iwashungry1992, to show the placeholder, just set If not then it may be a bug, and i need to fix it |
This made it work, thank you! |
The @ligiane solution was the best for my case. Thank you!!! |
Very very good, thank you. |
I tried your stackblitz, but seems like stackblitz can't find primeng 10.0.0, so I downgraded to 8.0.0, and tested with the direct: from the maybe it is a version problem, need to check, but here is a functional stackblitz: https://stackblitz.com/edit/primeng-calendar-demo-fxcvu2?file=package.json |
This is currently the most requested feature with 70 reactions. If you combine it with #3782 is has over 100 thumbs up. Some official response from Primefaces would be nice... @cagataycivici @yigitfindikli @mertsincan |
Including this feature in the primeng library would be awsome. It is a common feature in the business world with massive keyboard usage. @cagataycivici @yigitfindikli @mertsincan |
It's been 3 years, but @Da13Harris's suggestion is just too good.
|
racoon-mask-primeng works, but it is not supported well by all the formats. Also there is some issues with the 12 hours time format. I'm still looking forward to see a solution from PrimeNG. |
I made my own directive, and it seems to work fine : The directive :
Usage : Hope it helps |
This solution has been the best method for me so far. However, the one flaw is that if using form validation, the validation will trigger after an input goes beyond the 10 characters of the date. For example, if entering |
Hello, Any updates about this feature? it would be nice to have an input mask on the calendar. Thanks. |
another vote for this feature |
you save my day, and I add autoUnmask: true for typing the input |
Hi, So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you reopen the issue so we can include it in our roadmap? Best Regards, |
|
Is this really fixed? I can not find anything about setting an input mask on a calender component in https://primeng.org/calendar. |
up |
2 similar comments
up |
up |
Up |
+1 |
1 similar comment
+1 |
Up. |
I would say "Up" too 😁 |
I'm submitting a ... (check one with "x")
Current behavior
Now InputMask is not possible to be used in calendar input.
Expected behavior
Will be great if calendar will have option that will allow to use InputMask based on the
dateFormat
option.What is the motivation / use case for changing the behavior?
That feature will improve user experience when he inputs data from the keyboard.
The text was updated successfully, but these errors were encountered: