title: Remain focus and prevent character input except tab key
body: <p>Is there anyway that i can remain focused on the input element after selecting a date in jQuery datepicker? Also is there anyway that i can prevent user from typing anything but enabling the tab key? I'm currently using prevent default method but i only need to enable the tab key. Thank you. 
  Here is my current method.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$('body').on('focus',".dateSem",function() {
      $(this)
        .datepicker({
          changeMonth: true,
          changeYear: true,
          changeDay: true,
          showButtonPanel: true,
          dateFormat: 'yy/MM/dd',
          showMonthAfterYear: true,
          monthNames: ["01", "02", "03", "04",
            "05", "06", "07", "08", "09", "10",
            "11", "12"
          ],
          monthNamesShort: ["1", "2", "3", "4",
            "5", "6", "7", "8", "9", "10",
            "11", "12"
          ],
          dayNamesMin: ["日", "月", "火", "水", "木",
            "金", "土"
          ],
          minDate: new Date,
          currentText: '今日を選択',
          closeText: '確定',
          onClose: function(dateText, inst) {
            $(this).datepicker(
              'setDate',
              new Date(inst.selectedYear,
                inst.selectedMonth,
                inst.selectedDay));
          }
        });
      $(this).keydown(function(e) {
        e.preventDefault();
      });
  
    });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>