How I can display only month and year using md-datepicker
directive?
Currently, There is no information is available in Angular Material Documentation.
Can anyone help?
In the Data type Format dialog box, do one of the following: To format the control to show the date only, select the display style that you want in the Display the date like this list. To format the control to show the time only, select the display style that you want in the Display the time like this list.
Disable Past and Future Dates with min and max To disable past and future dates, we can use min and max properties in Datepicker input text with matInput attribute. If only past dates need to be disabled, configure only min property.
You can pass mode to the md-datepicker directive
md-mode="month"
e.g
<md-datepicker ng-model="dateFields.selectedDate"
md-mode="month">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With