Closed Ajayachathru closed 3 years ago
HI,
can't enter same Hour / Minute / Second in from & to time.
After debugging, Understood the issue in timer-box.component.js you are maintaining single inputStream for both from and to time.
distinctUntilChanged() will not emit when the same value is entered. we need to remove it or maintain separate streams for from & to time.
please fix this soon in ng-pick-datetime 7.0.0
Issue:
OwlTimerBoxComponent.prototype.ngOnInit = function () {
var _this = this;
this.inputStreamSub = this.inputStream.pipe(debounceTime(500), distinctUntilChanged()).subscribe(function (val) {
if (val) {
var inputValue = coerceNumberProperty(val, 0);
_this.updateValueViaInput(inputValue);
}
});
};
Fix:
OwlTimerBoxComponent.prototype.ngOnInit = function () {
var _this = this;
this.inputStreamSub = this.inputStream.pipe(debounceTime(500)).subscribe(function (val) {
if (val) {
var inputValue = coerceNumberProperty(val, 0);
_this.updateValueViaInput(inputValue);
}
});
};
@Ajayachathru thanks for your feedback.
I am not maintaining ng-pick-datetime 7.0.0. This current library is forked from that because it was no longer mainted.
I can look into fixing the issue here, as part of @danielmoncada/angular-datetime-picker
@danielmoncada
sure, thanks :+1:
Hi @danielmoncada
Have you fixed this issue ?
@Ajayachathru no, I'm busy at work with the moment, so I haven't had a chance. Feel free to fix it yourself and make a PR if you want
Hi @danielmoncada
Okay. I'll fix it and make a PR by tomorrow evening.
@Ajayachathru thanks, let me look over the PR. 👍
Hi @danielmoncada .. can you please check and merge this
@Ajayachathru taking a look now! thanks
@Ajayachathru published! thanks again https://www.npmjs.com/package/@danielmoncada/angular-datetime-picker/v/10.1.0
thanks :) @danielmoncada
I'm using Angular, 8 ng-pick-datetime version 7.0.0
In https://danielykpan.github.io/date-time-picker/ Use with @angular/forms section,
Click Date Time Range Picker, choose same date in from & to type in from time as 08:00:00 type in to time as 08:15:00
only seconds gets changed as 15, hours not changed !