-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
on FireFox if i try to change minutes then hour field also moving with minutes in nextjs app #51
Comments
This appears to be browser independent - spotted on Chrome and Edge as well as Firefox. Not sure about the inner workings, but the Edit: This was on a Angular 13 |
I have fixed this. Search for the line null!==this.hourTips Before that add a check if the minutes has 'active', then reuse the var to see if it can set the hour. Here is an example how to change it, be careful in the minimized code: var checkmins; checkmins=document.querySelector(".timepicker-ui-minutes"); if(checkmins && checkmins.classList.contains("active")) checkmins = false; if(null!==this.hourTips&&checkmins) |
@pglejzer is there a chance that this issue could be fixed in a patch release? I attempted to create a pull request, but without build documentation I couldn't figure out exactly how to build the library in a way I could test it in my app with something like npm link. Based on @Jurugi 's comment above, I thought an appropriate fix might be in index.ts:
but without being able to build and test it I'm not sure - I may have got the activeMins in the wrong part of the expression :) ... I'm happy to help out any way I can. |
let alreadyOpenedPicker = false;
timepickerParent?.addEventListener('click', () => {
document.querySelectorAll(".timepicker-ui-cancel-btn, .timepicker-ui-ok-btn").forEach(btn => {
btn.addEventListener('click', () => {
alreadyOpenedPicker = false;
});
})
if (!alreadyOpenedPicker) {
const timePickerPrototype = document.querySelector(".timepicker-ui-modal.normalize.timepicker-ui-normalize")
timePickerPrototype.remove();
console.log(timePickerPrototype);
alreadyOpenedPicker = true;
}
}) i find solution for this issue add this code to your js, it will fix it!!!!! |
@jinDeHao Thank you very much, your code worked perfectly. It fixed the issue with the time change in Safari and Firefox. Thank you so much! This is my code
|
Your are welcome 🤗 |
You need to make this code works only with Mozilla by adding condition above. |
Yes i do it , thanks |
screen-recording.webm
The text was updated successfully, but these errors were encountered: