Permalink
Browse files

feat: 日期组件支持设定特定时区,满足国际化方案中对日期组件的要求

  • Loading branch information...
LiuYueKai committed Apr 6, 2017
1 parent d039640 commit a7928a3127cabbd0b88f0199daf2e6c977583609
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/neoui-datetimepicker.js
@@ -137,7 +137,7 @@ DateTimePicker.fn._carousel = function(newPage, direction) {
addClass(newPage, 'left-page');
}
this._dateContent.appendChild(newPage);
if (env.isIE8 || env.isIE9 || env.isFF) {
if (env.isIE8 || env.isIE9 || env.isFF || true) { // 动画存在问题,禁用动画
// this._dateContent.removeChild(this.contentPage);
var pages = this._dateContent.querySelectorAll('.u-date-content-page');
for (var i = 0; i < pages.length; i++) {
@@ -443,8 +443,8 @@ DateTimePicker.fn._getPickerStartDate = function(date) {
DateTimePicker.fn._getPickerEndDate = function(date) {
var d = new Date(dateFormat(date));
d.setDate(1);
d.setMonth(d.getMonth() + 1);
d.setDate(0);
d.setMonth(d.getMonth() + 1);
var day = d.getDay();
d = udate.add(d, 'd', 6 - day);
return d;
@@ -573,6 +573,8 @@ DateTimePicker.fn._fillDate = function(type) {
this.pickerDate.setFullYear(e.target._year);
this.pickerDate.setMonth(e.target._month);
this.pickerDate.setDate(_d);
this.pickerDate.setMonth(e.target._month);
this.pickerDate.setDate(_d);
if (this.pickerDate) {
this.resetDataObj(this.pickerDate);
}

0 comments on commit a7928a3

Please sign in to comment.