Commit 418f799b authored by Juan Manuel Solaro's avatar Juan Manuel Solaro

(fix) introduce method to check time_published

1 merge request!494WIP: epic/post-scheduler
Pipeline #81172071 passed with stages
in 50 minutes and 54 seconds
......@@ -171,7 +171,7 @@
#thresholdInput
></m-wire-threshold-input>
<m-poster-date-selector
*ngIf="!blog.time_published"
*ngIf="checkTimePublished()"
[date]="getTimeCreated()"
(dateChange)="onTimeCreatedChange($event)"
(onError)="posterDateSelectorError($event)"
......
......@@ -350,4 +350,11 @@ export class BlogEdit {
? this.blog.time_created
: null;
}
checkTimePublished() {
return (
!this.blog.time_published ||
this.blog.time_published > Math.floor(Date.now() / 1000)
);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment