aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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"
/>;
}
}