This discussion is archived
1 2 Previous Next 16 Replies Latest reply: Apr 21, 2013 10:54 PM by rayanico RSS

Persian Datepicker

623711 Newbie
Currently Being Moderated
Hi
i want change apex datepicker to Persian?

my NLS_CALENDAR is PERSIAN and date format is YYYY/MM/DD but when opening datepicker, it don't correct.
i do try find table or object that save Month name of FLOWS_030100 schema, but no success. of course find view that one field is month name but don't change content filed.

views is:
1)WWV_FLOW_MONTHS_MONTH and
2)WWV_FLOW_MONTHS_MONTH_TEMP

please help

tnx
  • 1. Re: Persian Datepicker
    Denes Kubicek Oracle ACE Director
    Currently Being Moderated
    Although I don't know the Persian calendar, maybe this could show you the way to go:

    http://www.deneskubicek.blogspot.com/

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------
  • 2. Re: Persian Datepicker
    jkallman Employee ACE
    Currently Being Moderated
    Hi "user012354212101010000000000000000",

    I'm not sure what you mean by "don't correct". I was able to create an application using the Persian calendar:

    http://apex.oracle.com/pls/otn/f?p=46790:2:::::P2_EMPNO:7369

    However, when you popup the calendar, you're correct - the minimum year supported by the popup calendar is 1920, so it won't properly show today's year (1387) in a Persian calendar. The view WWV_FLOW_YEARS is used by the popup calendar for the year selection list.

    I hope I understood your question.

    Joel
  • 3. Re: Persian Datepicker
    623711 Newbie
    Currently Being Moderated
    Thanks.
    don't correct means when popup datepicker open in the dropdown that show month, write 'Farvarden' while must write 'فروردین'
    or in dropdown that show years write '2008' while must write '1387'
  • 4. Re: Persian Datepicker
    jkallman Employee ACE
    Currently Being Moderated
    "user012354212101010000000000000000",

    Yes - that would be correct. You'll note in my example that the month in the select list is 'فروردین', but the year is not 1387. The minimum year, as derived from the view mentioned above, is 1920.

    I don't have a good solution for you to update the available years in the select list, short of changing the underlying view in the FLOWS_xxxxxx schema. In the next release of Application Express, we will replace the calendar popup to overcome design limitations like this. As well, it's our intent to fully support the Persian and Hijra calendars.

    Joel
  • 5. Re: Persian Datepicker
    Arie Geller Guru
    Currently Being Moderated
    Hello,

    >> I don't have a good solution for you to update the available years in the select list, short of changing the underlying view in the FLOWS_xxxxxx schema.

    Following Joel’s advice, the following blog entry, by Denes, will help you do just that - http://deneskubicek.blogspot.com/2008/05/limit-datepicker-in-apex.html . For now, it’s the only public solution that allows you control over the years element of the built-in date picker.

    Regards,
    Arie.
  • 6. Re: Persian Datepicker
    Denes Kubicek Oracle ACE Director
    Currently Being Moderated
    Arie,

    I just found out the posted solution works only for the initial load of the datepicker.
    Changing the month or year will submit the page and start a new session so the
    limitation will not be valid any more. It looks like I will have to pull my blog posting from
    the site since it is not correct.

    I am sorry for confusing the people. I just didn't test the solution properly. So, until the next
    release is here, I see only one solution to the problem - to create your own calendar.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------
  • 7. Re: Persian Datepicker
    Arie Geller Guru
    Currently Being Moderated
    Hi Denes,

    >> Changing the month or year will submit the page and start a new session so the limitation will not be valid any more

    In my post I wrote about a “public solution” because I remembered that I played with a JS code which manipulated the date picker (from the time where the buttons were not part of the APEX translation mechanism) but I couldn’t remember why I eventually stopped working on it. Reading your post brought it all back. I encountered the same problem as you. I was able to manipulate the first appearance of the date picker popup window, but every change in the months/years re-displayed it with the original text.

    Anyway, it was nice and interesting attempt, on your part, to solve the problems, so I just hope you learned something out of it, and it wasn’t a complete waste of time.

    Regards,
    Arie.
  • 8. Re: Persian Datepicker
    Denes Kubicek Oracle ACE Director
    Currently Being Moderated
    Hello Arie,

    Sure I have learned something out of this situation. But this doesn't mean I give up. Just got
    an email from Patrick. He has an iteresting idea which I will try out (by the way, he always
    has an idea ;)). Let's see if that is doable. Will post anyway but this time I will test it better
    before.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------
  • 9. Re: Persian Datepicker
    623711 Newbie
    Currently Being Moderated
    thanks jole.
    in your post, write next version, it means in 3.1 version do'nt any solution? it means deadlock? :(
    but i don't wait for next release of APEX :)

    one question: why oracleDB or apex don't save all month of all calendar in table!? with this solution we can edit name of month, yes?
  • 10. Re: Persian Datepicker
    jkallman Employee ACE
    Currently Being Moderated
    OracleMan.,

    (It's so much easier typing "OracleMan." than "user012354212101010000000000000000").

    >> one question: why oracleDB or apex don't save all month of all calendar in table!? with this solution we can edit name of month, yes?

    Why is it necessary to edit the name of the month? If you derive the language preference properly, the name of the month should display properly.

    When you use a browser for your normal use, what is the language you have selected for your browser language?

    Joel
  • 11. Re: Persian Datepicker
    623711 Newbie
    Currently Being Moderated
    Thanks jKallman.
    my browser is Firefox 2 and language is Persian and English.

    Message was edited by:
    OracleMan.
  • 12. Re: Persian Datepicker
    623711 Newbie
    Currently Being Moderated
    my problem solved. :D
    thanks ATK.

    Message was edited by:
    OracleMan.
  • 13. Re: Persian Datepicker
    633850 Newbie
    Currently Being Moderated
    Hi all,

    I was also working on Persian Calendar for Oracle Form. May I have the correct NLS setup in order for me to display a Persian Calendar. These are the current setup that I set on my environment :

    NLS_LANG=ARABIC_SAUDI ARABIA.UTF8
    NLS_CALENDAR=PERSIAN

    With these setup, I manage to display correct month name and year on calendar. Unfortunately, the day name is incorrect as it show Hijr day name as below:
    al-jum'ah (friday),
    as-sabt(saturday),
    al-ahad(sunday),
    al-ithniyn(monday),
    ath-thulatha(tuesday),
    al-arba'aa(wednesday),
    al-khamees(thursday).

    How do i can get it to display Persian day name on the calendar like below:
    jomeh(friday),
    shanbe(saturday),
    yekshanbe(sunday),
    doshanbe(monday),
    seshanbe(tuesday),
    chaharshanbe(wednesday),
    panjshanbe(thursday).

    The reason why I choose ARABIC language and UTF8 characterset is because Oracle do not yet have the PERSIAN language value supported so far. Is it true?

    All kind of help are highly appreciated ...

    Thank you.
  • 14. Re: Persian Datepicker
    639897 Newbie
    Currently Being Moderated
    your welcome Oracleman :D
    ( Just recreating your mentioned view with static data )

    But about persian day name

    you can create Farsi language and Iran territory in oracle with oracle local builder an then set your nls_language to new generated language .
1 2 Previous Next