1.3.1 • Published 4 years ago

vue-dropdown-datepicker v1.3.1

Weekly downloads
382
License
ISC
Repository
github
Last release
4 years ago

Vue Dropdown Datepicker

A simple and customizable dropdown datepicker vue component.

Check Examples

Installation

vuejs is required to use this component

Package manager

Using npm

npm i vue-dropdown-datepicker

Using yarn

yarn add vue-dropdown-datepicker

Using bower

bower install vue-dropdown-datepicker

Using CDN

<script src="https://cdn.jsdelivr.net/npm/vue-dropdown-datepicker@1.3.1/dist/dropdown-datepicker.min.js"></script>

OR

<script src="https://unpkg.com/vue-dropdown-datepicker@1.3.1/dist/dropdown-datepicker.min.js"></script>

Usage

ES6

import DropdownDatepicker from '../src/dropdown-datepicker.vue';
new Vue({
    el: '#app',
    components: {
        DropdownDatepicker
    }
});

Browser

new Vue({
    el: '#app',
    components: {
        DropdownDatepicker
    }
});

Options

OptionTypeDefultComment
defaultDatestringnull
defaultDateFormatstring'yyyy-mm-dd'
displayFormatstring'dmy'
submitFormatstring'yyyy-mm-dd'
submitIdstringnull
minAgeintnull
maxAgeintnull
minYearintnull
maxYearintnull
minDatestringnullyyyy-mm-dd
maxDatestringnullyyyy-mm-dd
allowPastbooleantrue
allowFuturebooleantrue
wrapperClassstring'date-dropdowns'
dropdownClassstringnull
daySuffixesbooleantrue
monthSuffixesbooleantrue
monthFormatstring'long'
requiredbooleanfalse
dayLabelstring'Day
monthLabelstring'Month'
yearLabelstring'Year'
sortYearstring'desc'
monthLongValuesarray'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'
monthShortValuesarray'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
initialDayMonthYearValuesarray'Day', 'Month', 'Year'
daySuffixValuesarray'st', 'nd', 'rd', 'th'

Events

onDayChange

Call on any change of day dropdown

<dropdown-datepicker v-bind:on-day-change="yourFunctionName"><dropdown-datepicker>

onMonthChange

Call on any change of month dropdown

<dropdown-datepicker v-bind:on-month-change="yourFunctionName"><dropdown-datepicker>

onYearChange

Call on any change of year dropdown

<dropdown-datepicker v-bind:on-year-change="yourFunctionName"><dropdown-datepicker>

Contributing

Contributing Feel free to submit any fixes or propose any additional functionality via pull request or issue, making sure any changes take place in /src.

Minification and Validation Both are automated via npm command. Run npm install to install the required dependencies, then run npm run build from the root of the project to handle the tasks.

License

ISC

1.3.1

4 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago