Datepickers use a dialog window and provide a simple way to select a single value from a pre-determined set. The component can have disabled dates and it's really easy to use.
By default Datepicker component open on focus on it's input. This will make the input useless and the user will not be able to type de date manually. You can disable this behavior:
Sometimes you may need to disable certain dates from being selected. Let's suppose that you only want to let user to select work days:
All the following options can be applied to the md-datepicker component:
Name | Description | Default |
---|---|---|
v-model Date | The model variable to bind the selected date | null |
md-disabled-dates Array|Function | The optional disabled dates. Can be either Array or Function. - If Array , the Datepicker will disable all days inside. - If Function , the Datepicker will pass the current day as a parameter of this function. If the return false, then the date will be disabled. | null |
md-open-on-focus Boolean | Disable the on focus event. Will open only if the user clicks on the icon. | true |
md-override-native Boolean | Override native browser pickers by changing type of input to text. | true |