This is a migrated thread and some comments may be shown as answers.

Calendar Type is not working properly

2 Answers 44 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
JOY
Top achievements
Rank 1
JOY asked on 16 Jul 2015, 12:10 PM

While coming across your documentation here, about the Calendar Type in RadCalendarView I wasn't succeeding with the below code snippet

Locale locale= new Locale("ja_JP");
Calendar _Calendar = Calendar.getInstance(locale);
this.calendarView.setCalendar(_Calendar); 

It just change the FirstDayOfWeek and thus days will be wrong (for example, Jul 16, 2015 should be Thursday , but it shows wednesday).

Am i missed something, or is it a bug or something?

 

 

2 Answers, 1 is accepted

Sort by
0
JOY
Top achievements
Rank 1
answered on 16 Jul 2015, 12:45 PM
Also i'm in need of creating some other Calendar other than GregorianCalendar like JapaneseImperialCalendar.
0
Todor
Telerik team
answered on 17 Jul 2015, 03:04 PM
Hello,

Thank you for your interest in RadCalendarView.

As the documentation states, you can change the language by using the setLocale method. So in order to change the language of the day names you need this line:

calendarView.setLocale(Locale.JAPAN);

I am not sure about the Japanese names, however I can reproduce the screenshot from the documentation which also changes the first day of the week to Monday, but the date seems to be in the correct column. Please clarify how to reproduce the issue with the wrong placement of the dates.

As to the setCalendar method, it can be used for providing an instance of type different than GregorianCalendar. This can be a class that extends the Calendar class, however GregorianCalendar is the only implementation provided by Android so far. You may look for a JapaneseImperialCalendar implementation online or create one of your own.

I hope this information helps.

Regards,
Todor
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Calendar
Asked by
JOY
Top achievements
Rank 1
Answers by
JOY
Top achievements
Rank 1
Todor
Telerik team
Share this question
or