Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Event calendar

Go to End

15 Posts   3325 Views


Community Member, 95 Posts

20 July 2011 at 6:22pm

Oh, nice, and what about that issue of swapping sunday to be the last day in the week? That is to complicated to do?


Community Member, 95 Posts

26 July 2011 at 6:54pm

I'm sorry if I'm boring, but I don't have anywhere else to ask how to do this and it has to be done...
Any1 has any idea how to swap sunday to be the last day of the week?


Forum Moderator, 4102 Posts

27 July 2011 at 3:27am

It's not easy. I've tried to add that option, and it's just a lot of work. I welcome you to give it a shot and submit a pull request, however.

SilverStripe tips, tutorials, screencasts and more:


Community Member, 95 Posts

12 August 2011 at 1:29am

Haven't rly managed to do it yet, but have another problem now -
live calendar widget had a dropdown menu to select a month and such, but there are also 2 arrows for going on previous and next month.
The problem is they aren't working for me for some reason, well they do, but instead just changing the month in live calendar widget, they move to completly new page with only calendar of the previous/next month shown.

Also, since I've started using the live calendar widget, the calendar on calendar page isn't shown ever (it never loads, prolly cause it would mean there would be 2 calendars shown on same page, and that seems to bothers him)

Any ideas?


Community Member, 95 Posts

15 September 2011 at 1:58am

Hello, It's me again.

I have put the calendar aside, since I have managed to fix css/display of LivecalendarWidget so it is fine by my boss. However, now it turns out they rly aren't happy with sunday being the first day of the week and I have been trying to swap it to last day of the week.
The first thing I have found out about it is tha inside sfTime.class.php there is the following:

* Days of the week
const SUNDAY = 0;
const MONDAY = 1;
const TUESDAY = 2;
const WEDNESDAY = 3;
const THURSDAY = 4;
const FRIDAY = 5;
const SATURDAY = 6;

and I thought if I play with the numbers here I would manage to swap the days a bit, but doing so only swaps the day names of the columns in LiveCalendarWidget.
Do you know how I can play with the actual day number in the widget? As a help. I will try to add the option, or make a one-time swap for my needs if that is ok with you?


Community Member, 95 Posts

15 September 2011 at 8:06pm

Edited: 15/09/2011 8:26pm

I can see in the documentation it was once as I need it to be now:

in the displayed livecalendarwidget there is clearly monday as first day of the week and saturday and sunday come as last.
I guess you hardcoded it to not be like that any more for US display or whatever, but if it's not 2 much to ask can you tell me how to switch it back?
I rly don't need it as an option since it won't be done more then once, just a one time deal.

Thank you

EDIT: am looking at javascript and there seem to be the most important things about deciding which day of the week is first, but changing any info doesn't do much: has in itself the following:

* The first day of the week for this locale.
* @name firstDayOfWeek
* @type Number
* @cat Plugins/Methods/Date
* @author Kelvin Luck
Date.firstDayOfWeek = 1;

suggesting the first day of the week should be monday (acorging the alrdy mentioned above from sunday value = 0 to saturday = 6).
However aparently it is still sunday = 0 the first day of the week.

Changing this value doesn't do anything.

Then in jquery.Datepicker.js there is the following:

var start_of_week;
var end_of_week;
for (var i=0; i<7; i++) {
strDate = currentDate.getFullYear() + '-' + this._zeroPad(currentDate.getMonth()+1) + '-' + this._zeroPad(currentDate.getDate());
if(i == 0) start_of_week = strDate
if(i == 6) end_of_week = strDate;
var thisMonth = currentDate.getMonth() == month;

playing with if(i==0) start_of_week = strDate; and if(i==6) end_of_week = strDate; (0 being sunday, 6 being saturday) and changing it (0 to 1 and 6 to 0) also does nothing

I'm not sure why, i was sure it would atlest show some kind of a change, if nothing else then to screw up the whole calendar.


Community Member, 1 Post

11 July 2012 at 10:48pm

hi unclecheese,

is it possible to have dates for multiple calendars show in the live calendar widget without adding to the feed...

Go to Top