Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Calendar view (web calendar) shows allday items with UTC date [v9]

By
Mai Ecarde
on 8/17/16, 9:25 AM 198 views

Does anyone know if this is desired functionality (to work for multi-timezones)?

Is there a modification that can be made to webcalendar.js to change this behaviour?

Was thinking it would be modification of the following excerpt of code:

get_event_data: function(event) {
 ...
if (event.allDay) {
// Sometimes fullcalendar doesn't give any event.end.
if (event_end === null || _.isUndefined(event_end)) {
event_end = new Date(event.start);
}
if (this.all_day) {
date_start_day = new Date(Date.UTC(event.start.getFullYear(),event.start.getMonth(),event.start.getDate()));
date_stop_day = new Date(Date.UTC(event_end.getFullYear(),event_end.getMonth(),event_end.getDate()));
}
else {
date_start_day = new Date(event.start.getFullYear(),event.start.getMonth(),event.start.getDate(),7);
date_stop_day = new Date(event_end.getFullYear(),event_end.getMonth(),event_end.getDate(),19);
}
data[this.date_start] = time.datetime_to_str(date_start_day);
if (this.date_stop) {
data[this.date_stop] = time.datetime_to_str(date_stop_day);
}
diff_seconds = Math.round((date_stop_day.getTime() - date_start_day.getTime()) / 1000);
}


I don't want to modify the base code but I don't want to strip time from my allday events either...

Any suggestions?

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 8/17/16, 9:25 AM
Seen: 198 times
Last updated: 8/17/16, 12:22 PM