Browse Source

Pull request #304893: REPORT-146679 fix: 年月日时间格式调整

Merge in DEC/fineui from ~STAN.YANG/fineui-dec:final/11.0 to final/11.0

* commit '65d4baf0a436ebbd378de5400a8f8d1d033e32e8':
  REPORT-146679 fix: 年月日时间格式调整
master^2^2
parent
commit
43ac6f9b1a
  1. 4
      packages/fineui/src/widget/timeinterval/dateinterval.js

4
packages/fineui/src/widget/timeinterval/dateinterval.js

@ -195,8 +195,8 @@ export class DateInterval extends Single {
_check(smallDate, bigDate) { _check(smallDate, bigDate) {
// 现在有自定义样式,所以有["%X", "%d", "%Y"]这种不是[year, month, day]的情况,下面取对应的ymd就出错 // 现在有自定义样式,所以有["%X", "%d", "%Y"]这种不是[year, month, day]的情况,下面取对应的ymd就出错
// 所以先把这个string转成date,再转成默认格式string,只对自定义格式的date做处理 // 所以先把这个string转成date,再转成默认格式string,只对自定义格式的date做处理
const newSmallDate = this.options.format ? print(parseDateTime(smallDate, this.options.format), "%Y-%X-%d %H:%M:%S") : smallDate; const newSmallDate = this.options.format ? print(parseDateTime(smallDate, this.options.format), "%Y-%X-%d") : smallDate;
const newBigDate = this.options.format ? print(parseDateTime(bigDate, this.options.format), "%Y-%X-%d %H:%M:%S") : bigDate; const newBigDate = this.options.format ? print(parseDateTime(bigDate, this.options.format), "%Y-%X-%d") : bigDate;
const smallObj = newSmallDate.match(/\d+/g), const smallObj = newSmallDate.match(/\d+/g),
bigObj = newBigDate.match(/\d+/g); bigObj = newBigDate.match(/\d+/g);
return ( return (

Loading…
Cancel
Save