【发布时间】:2018-11-27 05:47:57
【问题描述】:
我已经搜索并看到了如何找到时间之间的差异,但是当我这样做时如何使用用户输入的日期?任何帮助表示赞赏。谢谢。
const activity = $('#activity').val();
const startValue = $('#start-time').val();
const endValue = $('#end-time').val();
const date = $('#date').val();
const timeStart = new Date("date" + startValue).getHours();
const timeEnd = new Date("date" + endValue).getHours();
const inBetween = timeEnd - timeStart;
【问题讨论】:
标签: javascript