js 篇章

时间选择框 约束

 var broStart = laydate.render({
	elem: '#broStart',
	 type: 'time',
	 theme:'#0079c5',
	 trigger:'click',
	 btns: ['clear','confirm'],
     done: function(value, date){
    	 broEnd.config.min = {
    		 year: date.year,
    		 month: date.month - 1,
    		 date: date.date,
			 hours: date.hours,
			 minutes: date.minutes,
			 seconds: date.seconds
		 }
    	 broEnd.config.value = value;
     }
  });
  
  var broEnd = laydate.render({
	 elem: '#broEnd',
	 type: 'time',
	 theme:'#0079c5',
	 trigger:'click',
	 btns: ['clear','confirm'],
	 /*done: function(value, date){
		 broStart.config.max = {
			 year: date.year,
    		 month: date.month - 1,
    		 date: date.date,
			 hours: date.hours,
			 minutes: date.minutes,
			 seconds: date.seconds
		 }
		 broStart.config.value = value;
	 }*/
  });

你可能感兴趣的:(Vue)