Oh, nice, and what about that issue of swapping sunday to be the last day in the week? That is to complicated to do?
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
- Previous 10 entries
- 1
- Page 22(current)
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?
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: http://www.leftandmain.com
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?
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?
I can see in the documentation it was once as I need it to be now:
http://doc.silverstripe.org/old/modules:event_calendar#modifying_the_template
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:
jquery.date.js 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.
hi unclecheese,
is it possible to have dates for multiple calendars show in the live calendar widget without adding to the feed...
- Previous 10 entries
- 1
- Page 22(current)