Permalink
Browse files

feat: fix:云表��单:��设置开始及结束��时间问题

  • Loading branch information...
Boyuzhou
Boyuzhou committed Oct 31, 2016
1 parent 0fb57d8 commit 0720e8feab129acfec3fcec721cf80ea41836964
Showing with 17 additions and 3 deletions.
  1. +2 −2 js/neoui-datetimepicker.js
  2. +15 −1 js/neoui-validate.js
@@ -1346,7 +1346,7 @@ DateTimePicker.fn.setStartDate = function(startDate){
if(startDate){
this.beginDateObj = udate.getDateObj(startDate);
this.beginYear = this.beginDateObj.getFullYear();
this.beginMonth = this.beginDateObj.getMonth();
this.beginMonth = this.beginDateObj.getMonth() + 1;
this.beginDate = this.beginDateObj.getDate();
}
@@ -1356,7 +1356,7 @@ DateTimePicker.fn.setEndDate = function(endDate){
if(endDate){
this.overDateObj = udate.getDateObj(endDate);
this.overYear = this.overDateObj.getFullYear();
this.overMonth = this.overDateObj.getMonth();
this.overMonth = this.overDateObj.getMonth() + 1;
this.overDate = this.overDateObj.getDate();
}
}
@@ -454,9 +454,23 @@ Validate.fn.showMsg = function(msg) {
"placement": this.placement,
"showFix": this.showFix
}
if (this.options.tipTemplate)
tipOptions.template = this.options.tipTemplate
if (!this.tooltip)
//月凯修改
// if (!this.tooltip)
this.referDom = this.$element;
if (this.referDom.tagName !== 'INPUT' && this.referDom.tagName !== "TEXTAREA") {
this.referDom = this.$element.querySelector('input');
// 如果referDom的父元素不是this.$element说明时单选框、复选框。则referDom还为$element
if (!this.referDom || this.referDom.parentNode !== this.$element) {
this.referDom = this.$element;
}
}
this.tooltip = new Tooltip(this.referDom, tipOptions)
this.tooltip.setTitle(msg);
this.tooltip.show();

0 comments on commit 0720e8f

Please sign in to comment.