Vue Material -

Datepicker


by Creative Tim
Docs
Components
Premium themes

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.

Datepicker

Basic Example
  • This config is global.
  • This config is global.
    Labeled Example

    Model Types

    Vue Material datepicker supports multiple types of v-model, whiches default is Date. If you want to communicate with other services without timezone problems, you could use String to avoid them:

    With different type binding

    Date

    value: Wed Mar 26 2025 11:53:54 GMT+0000 (Coordinated Universal Time)

    String

    value: 2025-03-26

    Number

    value: 1742990034586

    Dynamic By Model

    value: Wed Mar 26 2025 11:53:54 GMT+0000 (Coordinated Universal Time)

    Dynamic By :md-model-type

    value: Wed Mar 26 2025 11:53:54 GMT+0000 (Coordinated Universal Time)

    Cancel open on focus

    By default Datepicker component open on focus to it's input. This will make the input useless and the user will not be able to type the date manually. You can disable this behavior:

    With initial date selected

    Immediately selection

    The Datepicker dialog can be made to close instantly after a date is selected. The date will be selected immediately without any additional confirmation or user action:

    Close dialog on select

    Disabled dates

    Sometimes you may need to disable certain dates from being selected. Let's suppose that you want to let the user select only week days:

    No weekends available

    API - md-datepicker

    All the following options can be applied to the md-datepicker component:

    NameDescriptionDefault
    v-model Date|Number|String The model variable to bind the selected date null
    md-model-type Constructor Model type. This props will be overwritten by typeof v-model. It could be Date, Number or String. Date
    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-immediately Boolean Select the date without confirm and close the dialog immediately. false
    md-override-native Boolean Override native browser pickers by changing type of input to text. true
    md-debounce Number Debounces the conversion of plaintext into a date object. Set to a longer time if your users type slowly, or shorter if your users type really fast. 1000