Skip to content
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

allowInputToggle ?? #80

Open
StefanTD opened this issue Feb 22, 2018 · 7 comments · May be fixed by #269
Open

allowInputToggle ?? #80

StefanTD opened this issue Feb 22, 2018 · 7 comments · May be fixed by #269

Comments

@StefanTD
Copy link

Hi,

{allowInputToggle: true} dosen't work.
The input field gets focus but no picker.

@lyhung009
Copy link

The issue still occurs, any update?

@orasestravis
Copy link

I'm having the same issue.

@Groman123
Copy link

@Eonasdan Could this issue be simply fixed by changing line 1151?
Change from
TempusDominusBootstrap4._jQueryInterface.call($target, config, event);

Change to
`TempusDominusBootstrap4._jQueryInterface.call($target, 'show', event);

@bobvandevijver
Copy link
Contributor

Just tested: yes, that fixes it. Just created an PR for it: #106

@bobvandevijver
Copy link
Contributor

Not sure what happened since I made the PR and now it's been merged, but apparently the actual field now also needs to have the data-target set (after initialization).

I think it can be solved by checking if the element has the datatimepicker data object available:

if ($element.data(DateTimePicker.DATA_KEY)) {
 $selector = $element;
} else {
  return $selector;
}

at line 19 in the JS.

@Eonasdan Can you confirm?

@donatmarko
Copy link

Issue still exists.

@bobvandevijver bobvandevijver linked a pull request Jul 5, 2019 that will close this issue
@bobvandevijver
Copy link
Contributor

I've created a PR with my solution, as that works for me. If you're still waiting for this, you can use this workaround:

// Custom focus/blur handlers
$(document).on('focus.datetimepicker', '.datetimepicker-input', function () {
    $(this).datetimepicker('show', $(this).data('datetimepicker'));
});
$(document).on('blur.datetimepicker', '.datetimepicker-input', function () {
    $(this).datetimepicker('hide', $(this).data('datetimepicker'));
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants