forked from extern/egroupware
Sidebox calendar changes
- Fix month button only worked once.
This commit is contained in:
parent
b9c1ed72ce
commit
a71ab3b066
@ -2747,9 +2747,13 @@ app.classes.calendar = AppJS.extend(
|
||||
var month_button = date_widget.getRoot().getWidgetById('header_month');
|
||||
if(month_button)
|
||||
{
|
||||
var temp_date = new Date(year, month-1, 1);
|
||||
var temp_date = new Date(year, month-1, 1,0,0,0);
|
||||
//temp_date.setUTCMinutes(temp_date.getUTCMinutes() + temp_date.getTimezoneOffset());
|
||||
month_button.set_label(egw.lang(date('F',temp_date)));
|
||||
|
||||
// Store current _displayed_ date in date button for clicking
|
||||
temp_date.setUTCMinutes(temp_date.getUTCMinutes() - temp_date.getTimezoneOffset());
|
||||
month_button.btn.attr('data-date', temp_date.toJSON());
|
||||
}
|
||||
},
|
||||
// Mark holidays
|
||||
|
@ -43,7 +43,7 @@ Egroupware
|
||||
<buttononly id="header_today" label="Today" onclick="var tempDate = new Date();
|
||||
var today = new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate(),0,-tempDate.getTimezoneOffset(),0);
|
||||
app.calendar.update_state({date: today.toJSON()});return false;"/>
|
||||
<buttononly id="header_month" label="Month" onclick="app.calendar.update_state({view:'month'});" />
|
||||
<buttononly id="header_month" label="Month" onclick="app.calendar.update_state({date: widget.btn.data('date'), view:'month'});" />
|
||||
</hbox>
|
||||
<date id="date" class="et2_fullWidth" inline="true" onchange="var view_change = app.calendar.sidebox_changes_views.indexOf(app.calendar.state.view);
|
||||
var update = {date:widget.getValue()};
|
||||
|
Loading…
Reference in New Issue
Block a user