0

Date selection issue in ZK Calendar for Arabic

asked 2014-12-18 11:54:15 +0800

Aasifi gravatar image Aasifi
15 3

updated 2014-12-18 20:23:42 +0800

chillworld gravatar image chillworld flag of Belgium
5367 4 9
https://github.com/chillw...

Hello,

I have a ZK calendar at my JSP page.I have modified the language for ZK calendar as Arabic language and its looking perfect in Arabic language.The problem is that when I click on any date at calendar I m getting wrong dates from the events fired.I think its an issue due to the alignment that has been changed from LTR to RTL but the event fired is still referring old alignment. My code looks like

public void onEventCreate$calendar(CalendarsEvent event) {
    formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm");
    try {   
        String windowCheck = hiddenlabel.getValue();
        if (windowCheck.equalsIgnoreCase("mainPage")) {
            String stDate = "";
            String endDate = "";
            if (event != null) {
                 //Here I am getting wrong dates
                 stDate = formatter.format(event.getBeginDate()); 
                 endDate = formatter.format(event.getEndDate());
            }
            String uri = "DummyFile.jsp?eventaction=createevent&startDate=" + stDate + "&endDate=" + endDate;
            java.net.URLEncoder.encode(uri, "UTF-8");
            Executions.getCurrent().sendRedirect(uri, "_self");
        }
    }
    catch (Exception e){}
}

Please help its very urgent.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-12-27 18:08:25 +0800

Darksu gravatar image Darksu
1991 1 4

Hello Aasifi,

Please refer to the following post, which has information on how to set the timezone:

http://forum.zkoss.org/question/41343/calendars-timezone/

Furthermore please refer to the following url for more information:

http://books.zkoss.org/wiki/ZK%20Calendar%20Essentials/Working%20with%20ZK%20Calendar/Displaying%20ZK%20Calendar%20Event%20Data/Managing%20Event%20Data/Multiple%20Timezones

Best Regards,

Darksu

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-12-18 11:54:15 +0800

Seen: 11 times

Last updated: Dec 27 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More