1             let time = (wo: WoDto) => wo.ScheduleTime || wo.ScheduleStartTime;
2 
3             let wo = technician.wos
4                 .filter(x => time(x) != null)
5                 .sort((a, b) =>
6                     Math.abs(moment().diff(moment(time(a)))) -
7                     Math.abs(moment().diff(moment(time(b))))
8             )[0];
9             this.$calendar.fullCalendar('gotoDate', wo ? moment(time(wo)) : moment());

JQuery fullCalendar 时间差 排序获取距当前最近的时间。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
  • 2022-02-11
  • 2021-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-23
  • 2021-12-23
  • 2021-08-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案