Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setCopyViewModel(dvm: IDraggableViewModel | null) {
this.copiedViewModel = dvm;
this.copiedViewModelSource.next(Ro.withUndefined(dvm));
}
setDateIfChanged(newDate: momentNs.Moment) {
const currentDate = this.dateModel;
if (!newDate.isSame(Ro.withUndefined(currentDate))) {
this.setValue(newDate);
setTimeout(() => this.model = this.formatDate(this.dateModel));
}
}
setTimeIfChanged(newTime: momentNs.Moment) {
if (!newTime.isSame(Ro.withUndefined(this.time))) {
this.time = newTime;
setTimeout(() => this.model = newTime.format('HH:mm'));
}
}