Skip to content

Commit 109c646

Browse files
authored
fix: Update timezone on the interim create page (ietf-tools#4262)
* Fix: Update timezone on the interim create page The interim creation screen will set the timezone to the timezone of the browser. Unfortunately, the UI element was never refreshed, so it remained on its loaded default, thus telling the user the wrong value. This change adds a timezone widget refresh to the end of the function that loads the browser's local timezone into the timezone value. This change also adds code to update the 'Local timezone' help text for the start time and end time input bozes to call out the selected timezone specifically. Fixes ietf-tools#3898 * Fix: Change var to const for code review
1 parent a5f27b0 commit 109c646

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

ietf/static/js/meeting-interim-request.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ const interimRequest = (function() {
185185
.length > 0) {
186186
$('#id_time_zone')
187187
.val(tzname);
188+
$('#id_time_zone')
189+
.trigger('change');
188190
}
189191
}
190192
},
@@ -231,10 +233,14 @@ const interimRequest = (function() {
231233
},
232234

233235
timezoneChange: function () {
236+
const tzname = $(this).val();
234237
$("input[name$='-time']")
235238
.trigger('blur');
236239
$("input[name$='-end_time']")
237240
.trigger('change');
241+
$('input[type="text"][name*="time"]').next().each(function(){
242+
this.innerText = "Time in the " + tzname + " time zone";
243+
});
238244
},
239245

240246
toggleLocation: function () {
@@ -268,4 +274,4 @@ const interimRequest = (function() {
268274
$(function () {
269275
'use strict';
270276
$('#interim-request-form').each(interimRequest.init);
271-
});
277+
});

0 commit comments

Comments
 (0)