diff options
author | Stanley Yip <stanley_yip@brown.edu> | 2020-01-08 13:47:29 -0500 |
---|---|---|
committer | Stanley Yip <stanley_yip@brown.edu> | 2020-01-08 13:47:29 -0500 |
commit | abfa42b6f2cf863deee19aac19328a23687464cb (patch) | |
tree | b481f23ffa7bccbde7a31de34f50d765b6b73162 /src/new_fields/DateField.ts | |
parent | d8fc218f3481728f221ceacc60ac4bc553f8e295 (diff) | |
parent | 19a71cb2788b9c1c8d8ced4af285bf91033ba626 (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into pen
Diffstat (limited to 'src/new_fields/DateField.ts')
-rw-r--r-- | src/new_fields/DateField.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/new_fields/DateField.ts b/src/new_fields/DateField.ts index abec91e06..4f999e5e8 100644 --- a/src/new_fields/DateField.ts +++ b/src/new_fields/DateField.ts @@ -19,6 +19,10 @@ export class DateField extends ObjectField { return new DateField(this.date); } + toString() { + return `${this.date.toISOString()}`; + } + [ToScriptString]() { return `new DateField(new Date(${this.date.toISOString()}))`; } |