-
Notifications
You must be signed in to change notification settings - Fork 556
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
Disable input field of datepicker #2221
Comments
PR welcomed! |
This issue has been fixed and released as part of v5.7 release. You can now pass the templateOptions: {
datepickerOptions: {
disabled: true,
},
}, Please let us know, in case you are still encountering a similar issue/problem. |
I am on Formly Material 5.10.3.
Worse, the other fields which were disabled gets enabled |
@SubrahmanyaV Could you please provide a reproduction example |
|
fixed by #2613 |
the fix will be available in |
This issue has been fixed and released as part of v5.10.7 release. Please let us know, in case you are still encountering a similar issue/problem. |
|
Is there an option to only disable the input field and use only the material date picker icon? |
use {
"templateOptions": {
+ "readonly": true
}
} |
I am trying to disable the input field of the datepicker component, the equivalent of what would be achieved by
<mat-form-field> <mat-label>Input disabled</mat-label> <input matInput [matDatepicker]="dp3" disabled> <mat-datepicker-toggle matSuffix [for]="dp3"></mat-datepicker-toggle> <mat-datepicker #dp3 disabled="false"></mat-datepicker> </mat-form-field>
But cannot find any way to do this using
templateOptions
ordatepickerOptions
Do I have to create a custom date picker template to enable this functionality, or is there a way to do it with the pre-existing datepicker template?
The text was updated successfully, but these errors were encountered: