Closed dhavalsolankislk closed 4 years ago
@danielmoncada - Any Update ?
@dhavalsolankislk is the new value reflected AFTER 500ms?
@danielmoncada New value is reflected after 1000ms
Okay, thanks @dhavalsolankislk . I'll look into this later today (it's almost 1AM here). Any reason why you need to have it reflect right away?
@danielmoncada We need to reflect right away as here text field of minute and set button is very near, so our client instantly click on set button after setting value of minutes within 500ms
Attaching the snap of it
@danielmoncada any update ?
@danielmoncada Any update ?
@dhavalsolankislk I cannot reproduce this in the demo app of the repo. As soon as I press 'Set', the time is reflected immediately in the TextBox.
Can you post your HTML / component.ts code?
Hello, @danielmoncada Our html code is as below
<div class="form-group mr-2">
<label class="control-label"> {{'To'|translate}} *</label>
<div class="input-inside-btn input-inside-btn-style-1">
<input class="form-control" [owlDateTimeTrigger]="dt2" placeholder="DD-MM-YYYY HH:MM"
[owlDateTime]="dt2" formControlName="toDate">
<owl-date-time [pickerType]="'both'" #dt2></owl-date-time>
<button type="button" class="btn btn-icon-none" [owlDateTimeTrigger]="dt2">
<i class="ik-l-55 micon-calendar overlap-icon color-primary"></i>
</button>
</div>
</div>
Not specific code in ts file
Issue is reproduced in below link https://danielykpan.github.io/date-time-picker/
@dhavalsolankislk thanks for the snippet.
As per your link, which example is the issue occurring at? When I change the time and immediately click SET, it's reflected in the TextBox right away (and not haver 1000 ms).
Hi, @danielmoncada Problem generated below photo with given link (https://danielykpan.github.io/date-time-picker/)
Video For above problem: screen-capture.zip
This is caused by https://github.com/danielmoncada/date-time-picker/blob/master/projects/picker/src/lib/date-time/timer-box.component.ts#L85. If you click 'Set' before the debunceTime elapses, the value is not persisted. I believe the debounceTime could be safely removed since the user can write only two numbers and furtheremore no complex logic takes place after the time is set.
Hello,
We are using date-time-picker in our application. We have a problem that when we are facing a issue that when we are changing time picker value and click on set button with in 500ms the value is not reflected. So in the datepicker text field value of minutes or hour which we have set remains as it is and the new value is not reflected.