Changing the first day of week of the calendar widget

43 views
Skip to first unread message

Antonio Salazar

unread,
Feb 18, 2016, 1:13:31 PM2/18/16
to web2py-users
The first day of week is important because the week number is dependent on it. It currently is Sunday, but I need it to be Monday.

Example:
January 1st 2016 is in week 52 if the first day is Sunday, but it's in week 53 if the first day is Monday.

I tried including the parameter fdow: 1 in the second call to Calendar.setup() in web2py.js, but it has no effect. The only thing that worked was changing Calendar._FD=0 to Calendar._FD=1 directly in calendar.js. It works, but I would prefer to make the change in web2py.js to include a variable like w2p_ajax_first_day_of_week in web2py_ajax.html and make it localizable.

My question is: Can I change the fdow of the calendar widget in other way besides changing calendar.js?

P.S.
I'm using web2py 2.12.3-stable+timestamp.2015.08.19.00.18.03
Reply all
Reply to author
Forward
0 new messages