aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoranika-ahluwalia <anika.ahluwalia@gmail.com>2020-06-28 13:19:34 -0500
committeranika-ahluwalia <anika.ahluwalia@gmail.com>2020-06-28 13:19:34 -0500
commitd118a988d5233a282cea4f878ee4a569c2d413fc (patch)
treeb2de5b24792fc1d52d359dabcd4e39471d295e1a
parent3764d9a1fbac63452ce9da8fdabfa83c49f8004d (diff)
slight modification to date
-rw-r--r--src/client/views/collections/CollectionSchemaCells.tsx7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx
index cdcc67294..0026ab927 100644
--- a/src/client/views/collections/CollectionSchemaCells.tsx
+++ b/src/client/views/collections/CollectionSchemaCells.tsx
@@ -380,14 +380,17 @@ export class CollectionSchemaDateCell extends CollectionSchemaCell {
@action
handleChange = (date: any) => {
this._date = date;
- this.prop.Document[this.prop.fieldKey] = date;
+ this.prop.Document[this.prop.fieldKey] = DateCast(date);
+ this._field = DateCast(date);
}
render() {
return <DatePicker
- selected={this._date}
+ selected={this._field ? DateCast(this.prop.Document[this.prop.fieldKey]).date : this._date}
onSelect={date => this.handleChange(date)}
onChange={date => this.handleChange(date)}
+ showTimeSelect
+ dateFormat="Pp"
/>;
}
}