【发布时间】:2016-12-16 04:26:53
【问题描述】:
我正在使用 Kendo UI DateTimePicker,它以这种格式返回选定的日期:
Thu Dec 15 2016 23:23:30 GMT-0500
我的目标是像这样将这个日期传递给 moment.js 以获得这一天:
var momentDate = moment(selectedDate);
var moneyDayStr = momentDate.format('dddd');
但是,momentDate 最终只是默认为今天的日期,因为 selectedDate 被视为无效格式。
【问题讨论】:
标签: javascript jquery kendo-ui momentjs datetimepicker