visitortimezone.js 385 B

123456789101112
  1. /* global jstz */
  2. $(document).ready(function () {
  3. $('#timezone-offset').val((-new Date().getTimezoneOffset() / 60));
  4. $('#timezone').val(jstz.determine().name());
  5. // only enable the submit button once we are sure that the timezone is set
  6. var $loginForm = $('form[name="login"]');
  7. if ($loginForm.length) {
  8. $loginForm.find('input#submit').prop('disabled', false);
  9. }
  10. }
  11. );