Fix bug with default date input
When the input isn't touched by the user, the date isn't stored as an array on the property.
This commit is contained in:
@@ -50,7 +50,11 @@ export default Component.extend({
|
||||
}
|
||||
|
||||
const attributes = this.getProperties(Object.keys(this.attributes));
|
||||
const [ date, time ] = attributes.date[0].toISOString().split('T');
|
||||
|
||||
let dateInput = (attributes.date instanceof Array) ?
|
||||
attributes.date[0] : attributes.date;
|
||||
|
||||
const [ date, time ] = dateInput.toISOString().split('T');
|
||||
[ attributes.date, attributes.time ] = [ date, time ];
|
||||
|
||||
this.set('inProgress', true);
|
||||
|
||||
Reference in New Issue
Block a user