Vuejs-Vue datepicker infinite: vue2-datePicker-infinite - An infinite datePicker for Vue2, easy to use and no dependencies.

vue-datepicker-infinite

easy datepicker of a vue 2.0 component

Coverage Status

install

npm install vue2-datepicker-infinite --save

how to use

template:
	<transition  name="slide" >
		<DatePicker @select="calendar.select" :start="calendar.start"  :last="calendar.last" :beginDate="calendar.begin" :endDate="calendar.end" :monthLength="calendar.monthLength"  v-show="calendar.show" ></DatePicker>
	</transition>

script:
	//import
	import DatePicker from './../common/datePicker/datePicker.vue'
	//define
	components:{
		DatePicker
	},
	//set default data
	data(){
		return{
			calendar:{
				monthLength:6,
				show:false,
				start:'2019-08-01',
				last:'2019-08-03',
				begin:'2019-08-01',
				end:'2019-12-01',
				select:(begin,end)=>{
					this.calendar.show=false;
					this.calendar.begin=begin;
					this.calendar.end=end;
				}
			},
		}
	}

props description

monthLength:max month lenght
beginText:begin text name
endText:end text name
isReverseAllow:allow to reverse date when select,
start:the calendar's begining date
last:the calendar's last date
beginDate: begin of the select
endDate:end of the select

Comments

  • Possibility of disable specific dates
    Possibility of disable specific dates

    Aug 27, 2018

    Calendar is really easy and nice.

    I want to ask about feature request: possibility of disable some specific dates.

    Reply
  • 增加“今天”显示;增加“reverse”属性允许反向选择,默认不允许;默认不允许选择以往的日期;优化代码;微调部分样式;
    增加“今天”显示;增加“reverse”属性允许反向选择,默认不允许;默认不允许选择以往的日期;优化代码;微调部分样式;

    Jun 15, 2018

    公司正好有这个需求,你这个能用就拿过来了,改了一些代码,增加了些功能

    Reply