View unanswered posts | View active topics It is currently Wed May 24, 2017 5:24 am



This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
 Change Locale / first day of week 
Author Message

Joined: Thu Oct 14, 2010 10:44 pm
Posts: 3
Post Change Locale / first day of week
Hi, I am in the evaluation phase of MiG Calendar.

I am in the US and need to use Monday as the first day of the week. I do not want to use "Locale.setDefault(XXX)" as this would have other side effects to the rest of the app. Previous posts made it appear that you could set the Locale on the DateAreaBeans to achieve this.

I've tried this approach with the BeanDemo. Changing the Locale on the beans had no affect. The only way I've gotten a change is by passing a Locale in the DateRange creations. This only works for the initial settings. Once I click on the calendar on the left I'm back to Sun-Sat.

How can I achieve this without changing my default Locale?


Thu Oct 14, 2010 11:02 pm
Profile
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post Re: Change Locale / first day of week
Hello,

Java isn't really made to work with a different first day of week than the one in the Locale.

What you need to do is set the Locale that you want with the correct first day of week on everything MiG Calendar related. If different Locales was set for different parts in MiG Calendar it is hard to overview the consequences. Basically this means that you should set the Locale on any component that has a .setLocale() and on every DateRange created.

The simple way is to set a default locale as you mention. Maybe GB or Australian?

Thanks,


Thu Oct 14, 2010 11:18 pm
Profile WWW
Display posts from previous:  Sort by  
This topic is locked, you cannot edit posts or make further replies.   [ 2 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.