christiannaths / christiannaths/jquery-datetimepicker
input losed focus on sliding time
- Dominant language
- JavaScript
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
With the normal jQuery UI datepicker, you can select a date, but it immediately brings focus back to the input element (Assuming that you are not closing on select). No focusing causes problems when trying to "tab" through to the next element.
Changing lines #280-#286 from:
if (this.defaults.timeOnly === true) {
this.$input.val(this.formattedTime);
$(this.$input).trigger("change");
} else {
this.$input.val(this.formattedDateTime);
$(this.$input).trigger("change");
}
to ...
if (this.defaults.timeOnly === true) {
this.$input.val(this.formattedTime);
$(this.$input).trigger("change").focus();
} else {
this.$input.val(this.formattedDateTime);
$(this.$input).trigger("change").focus();
}
fixes the issue
Contributor guide
No contributing guide indexed for this repository
Research direction
Inspect the update logic around lines 280-286 and reproduce the date or time selection with closing disabled. Verify how focus is handled after the change event, then confirm that tabbing moves to the next element rather than returning to the input. Done means the reported focus behavior is corrected for both time-only and date-time selections.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, jquery
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100