FIX: removes UTC conversion when date and no time
This commit is contained in:
parent
dc04892a2d
commit
6e3a2197f8
|
@ -100,14 +100,14 @@ export default Ember.Component.extend({
|
||||||
if (time) {
|
if (time) {
|
||||||
dateTime = moment(`${date} ${time}`, this.dateTimeFormat).utc();
|
dateTime = moment(`${date} ${time}`, this.dateTimeFormat).utc();
|
||||||
} else {
|
} else {
|
||||||
dateTime = moment(date, this.dateFormat).utc();
|
dateTime = moment(date, this.dateFormat).startOf("day");
|
||||||
}
|
}
|
||||||
|
|
||||||
let toDateTime;
|
let toDateTime;
|
||||||
if (toTime) {
|
if (toTime) {
|
||||||
toDateTime = moment(`${toDate} ${toTime}`, this.dateTimeFormat).utc();
|
toDateTime = moment(`${toDate} ${toTime}`, this.dateTimeFormat).utc();
|
||||||
} else {
|
} else {
|
||||||
toDateTime = moment(toDate, this.dateFormat).utc();
|
toDateTime = moment(toDate, this.dateFormat).endOf("day");
|
||||||
}
|
}
|
||||||
|
|
||||||
let config = {
|
let config = {
|
||||||
|
|
Loading…
Reference in New Issue