-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
datepicker to close using double tab in mobile phone #3174
Comments
Its know ios issue with hover |
if it helps anyone, you can also capture and extend the hover listener, to manually update the value or close the picker - hacky but works until a formalised solution is implemented // component.html
<input type="text"
class="form-control"
#datePicker="bsDatepicker"
(onShown)="onShowPicker($event)"
bsDatepicker>
// component.ts
...
onShowPicker(container) {
const dayHoverHandler = container.dayHoverHandler;
const hoverWrapper = function($event) {
const { cell, isHovered } = $event;
// do whatever with hovered cell/event
return dayHoverHandler($event);
};
container.dayHoverHandler = hoverWrapper;
} |
This was closed as a duplicate...of what issue? |
@danitt Thanks, I was able to resolve the mobile 'double-tap' issue by just modifying your function to set hover true, add this in place of your 'do whatever': |
Solution that worked for me is: public onShowPicker(event) {
const dayHoverHandler = event.dayHoverHandler;
const hoverWrapper = ($event) => {
const cell = $event;
cell.isHovered = false;
return dayHoverHandler($event);
};
event.dayHoverHandler = hoverWrapper;
} Point here is, that |
I using well this ngx bootstrap. but i have some issues about datepicker.
In my mobile phone, to close datepicker, i need to double tab.
how can i close datepicker with single tap??
The text was updated successfully, but these errors were encountered: