Skip to content
This repository was archived by the owner on Jan 29, 2021. It is now read-only.

yangirov/vue-date-dropdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vue Date Dropdown

A Vue date dropdown component

npm version

Example

Contents

Installing

npm install vue-date-dropdown --save

yarn add vue-date-dropdown
import DateDropdown from 'vue-date-dropdown'

export default {
	...
	components: {
		DateDropdown
	},
	data () {
		return {
			selectedDate: '',
			...
		}
	}
	...
}

Or if you are using CDN version

<script src="vue-date-dropdown.min.js"></script>

<script>
Vue.use(DateDropdown)

new Vue({
	...
	data() {
		return {
			selectedDate: '',
			...
		}
	}
	...
});
<script>

Examples

See the demo in the example folder.

Setting a default date

<date-dropdown default="1995-01-10" v-model="selectedDate" />

Setting a min date

<date-dropdown min="1960" v-model="selectedDate" />

Setting a max date

<date-dropdown max="2018" v-model="selectedDate" />

Setting a range of dates

<date-dropdown min="1960" max="2017" v-model="selectedDate" />

Setting Russian names of months

<date-dropdown
	v-model="selectedDate" 
	months-names="Январь, Февраль, Март, Апрель, Май, Июнь, Июль, Август, Сентябрь, Октябрь, Ноябрь, Декабрь">
<date-dropdown>

API

Props

Name Type Description
default String Set default date.
min String Limits the year to a minimum specified value.
max String Limits the year to a maximum specified value.
months-names String The alternative names of month.

Releases

No releases published

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy