Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-20014

JIRA calendar has a first day of the week bug ... dpending on how its call

    XMLWordPrintable

Details

    Description

      The calendar pop will show a different starting day or the week dpendiong how where it is called. For exmple the issue navigator popup is correct but the work log one is wrong.

      We have 2 ways to invoke the datepicker

      macros.vm for Velocity files and datepicker2.jsp. The first one is correct

          Calendar.setup({
              firstDay    : ($currentCalendar.firstDayOfWeek) -1,              // first day of the week
      

      and the second one (datepicker2) is wrong

              Calendar.setup({
                  firstDay     : <%= Calendar.getInstance(locale).getFirstDayOfWeek()%>,              // first day of the week
      

      The reason the -1 is needed is that the Calendar js uses 0 as Sunday, and 1 as Monday while Java uses 1 as Sunday and 2 as Monday

      We need to fix this. Its a very easy fix.

      As a work around customers need to change

      template/standard/datepicker.jsp and template/single/datepicker.jsp

      you should change line 69 to be

              Calendar.setup({
                  firstDay     : <%= Calendar.getInstance(locale).getFirstDayOfWeek() -1 %>,              // first day of the week
      

      Attachments

        Issue Links

          Activity

            People

              pleschev Peter Leschev
              bbaker ɹǝʞɐq pɐɹq
              Votes:
              11 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: