Edgewall Software

Opened 9 years ago

Last modified 5 years ago

#12228 closed defect

Disable autocomplete on datepicker and datetimepicker inputs — at Version 1

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Milestone: 1.2
Component: general Version:
Severity: normal Keywords: jqueryui
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Ryan J Ollos)

It would be nice to disable autocomplete on the datepicker and datetimepicker inputs.

Proposed change:

  • trac/templates/layout.html

    diff --git a/trac/templates/layout.html b/trac/templates/layout.html
    index 96d93a1..f14da91 100644
    a b  
    6262        $(".trac-autofocus").focus();
    6363        $(".trac-target-new").attr("target", "_blank");
    6464        if ($.ui) { /* is jquery-ui added? */
    65           $(".trac-datepicker:not([readonly])").datepicker();
    66           $(".trac-datetimepicker:not([readonly])").datetimepicker();
     65          $(".trac-datepicker:not([readonly])").datepicker()
     66            .focus(function() {
     67              $(this).prop("autocomplete", "off");
     68//              return false;
     69          });
     70          $(".trac-datetimepicker:not([readonly])").datetimepicker()
     71            .focus(function() {
     72              $(this).prop("autocomplete", "off");
     73//              return false;
     74          });
    6775        }
    6876        $(".trac-disable").disableSubmit(".trac-disable-determinant");
    6977        setTimeout(function() { $(".trac-scroll").scrollToTop() }, 1);

Should I return false to avoid the default behavior and prevent bubbling? So far I can't see any difference in behavior when returning false vs no return value.

Change History (2)

by Ryan J Ollos, 9 years ago

Attachment: Autocomplete.png added

comment:1 by Ryan J Ollos, 9 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.