Fix for default timezone if missing.
This commit is contained in:
parent
da54680397
commit
33ca84c982
|
@ -22,7 +22,7 @@ input { width: 200px; }
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$(".timepicktest0").datetimepicker({ dateFormat: $.datepicker.RFC_2822, timeFormat: 'hh:mm' });
|
$(".timepicktest0").datetimepicker({ dateFormat: $.datepicker.RFC_2822, timeFormat: 'hh:mm' });
|
||||||
$(".timepicktest1").datetimepicker({ dateFormat: $.datepicker.RFC_2822, timeFormat: 'hh:mm z', showTimezone: true });
|
$(".timepicktest1").datetimepicker({ dateFormat: $.datepicker.RFC_2822, timeFormat: 'hh:mm z', showTimezone: true, timezone: "+0100" });
|
||||||
$(".timepicktest2").datetimepicker({ dateFormat: $.datepicker.RFC_2822, timeFormat: 'hh:mm z', showTimezone: true,
|
$(".timepicktest2").datetimepicker({ dateFormat: $.datepicker.RFC_2822, timeFormat: 'hh:mm z', showTimezone: true,
|
||||||
timezoneList: [{"value": "+0000", "label": "British Winter Time"}, {"value": "+0100", "label": "British Summer Time"}] });
|
timezoneList: [{"value": "+0000", "label": "British Winter Time"}, {"value": "+0100", "label": "British Summer Time"}] });
|
||||||
});
|
});
|
||||||
|
|
3
jquery-ui-timepicker-addon.js
vendored
3
jquery-ui-timepicker-addon.js
vendored
|
@ -54,6 +54,7 @@ function Timepicker() {
|
||||||
hour: 0,
|
hour: 0,
|
||||||
minute: 0,
|
minute: 0,
|
||||||
second: 0,
|
second: 0,
|
||||||
|
timezone: '+0000',
|
||||||
hourMin: 0,
|
hourMin: 0,
|
||||||
minuteMin: 0,
|
minuteMin: 0,
|
||||||
secondMin: 0,
|
secondMin: 0,
|
||||||
|
@ -409,7 +410,7 @@ $.extend(Timepicker.prototype, {
|
||||||
.text(typeof val == "object" ? val.label : val);
|
.text(typeof val == "object" ? val.label : val);
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
this.timezone_select.val(this.timezone);
|
this.timezone_select.val((typeof this.timezone != "undefined" && this.timezone != null && this.timezone != "") ? this.timezone : o.timezone);
|
||||||
this.timezone_select.change(function() {
|
this.timezone_select.change(function() {
|
||||||
tp_inst._onTimeChange();
|
tp_inst._onTimeChange();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue