-
Notifications
You must be signed in to change notification settings - Fork 13
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
prevent typing in input filed #17
Comments
You can set input box disabled or readonly. <input angular-mydatepicker disabled />
or
<input angular-mydatepicker readonly /> |
Sir really appreciate your help. Thank you.
…On Sun, Nov 10, 2019 at 5:19 PM Keke ***@***.***> wrote:
You can set input box disabled or readonly.
<input angular-mydatepicker disabled />
or
<input angular-mydatepicker readonly />
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#17?email_source=notifications&email_token=AM7IX3PPQ3O6K2UHMYWL733QS7YLHA5CNFSM4I3NFGP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDU3MGQ#issuecomment-552187418>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AM7IX3LNGGKINIDOVBYOFKTQS7YLHANCNFSM4I3NFGPQ>
.
|
If you are using version 0.2.1 you can also use div as a host element. Then the date field is not editable. See example code from here: https://github.com/kekeh/angular-mydatepicker/tree/master/example/app/date-picker-div-host-element Check also the divHostElement option from the README. |
Hi, if I set input box disabled, the value of the angualr-mydatepicker is doesn't show.
|
Hi @9marta5 You can try to do it this way: public disabled: boolean = true; <input name="mydate" [attr.disabled]="disabled ? '' : null" /> In above if the value of the disabled member is true then there will be disabled attribute in the input box, otherwise not. I have done it that way here in my test application and it works. Here is instructions on how to run the test application. |
Hi @kekeh thank you so much. It works! |
Thanks for the trick ! |
Hello Sir,
Your plugin is working well for me. Thanks to that.
But when I try to type a text in the input field of an angular-mydatepicker directive it is enabled to typing there. Plz, help me out how to prevent typing text in angular-mydatepicker.
Thank You
The text was updated successfully, but these errors were encountered: