aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-02-10 19:02:14 -0500
committerbobzel <zzzman@gmail.com>2024-02-10 19:02:14 -0500
commita60c3ecd243d293ff6843c4868fd953d465b45a1 (patch)
treeb892d2ce11204177ff46b6066c2b27c24e65fbbe /src
parent1fb6e20ab4338b8265c7d7c9517446430f9afbf6 (diff)
more updates to npm packages.
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/collectionSchema/SchemaTableCell.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx
index dbaa6e110..5c0eba860 100644
--- a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx
+++ b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx
@@ -261,18 +261,18 @@ export class SchemaDateCell extends ObservableReactComponent<SchemaTableCellProp
}
@action
- handleChange = (date: any) => {
+ handleChange = (date: Date | null) => {
// const script = CompileScript(date.toString(), { requiredType: "Date", addReturn: true, params: { this: Doc.name } });
// if (script.compiled) {
// this.applyToDoc(this._document, this._props.row, this._props.col, script.run);
// } else {
// ^ DateCast is always undefined for some reason, but that is what the field should be set to
- this._props.Document[this._props.fieldKey] = new DateField(date as Date);
+ date && (this._props.Document[this._props.fieldKey] = new DateField(date));
//}
};
render() {
- return <DatePicker dateFormat={'Pp'} selected={this.date.date} onChange={(date: any) => this.handleChange(date)} />;
+ return <DatePicker dateFormat="Pp" selected={this.date.date} onChange={date => this.handleChange(date)} />;
}
}
@observer