Loading ...
Sorry, an error occurred while loading the content.

Calendar week numbers

Expand Messages
  • Kudret Serin
    Hi all, I have a CalendarGroup widget and it shows the week numbers on each row. However the weeknumbers start from 0. For example: Week 0 2008/2009 (28.12.08
    Message 1 of 2 , May 9, 2008
    • 0 Attachment

       

      Hi all,

      I have a CalendarGroup widget and it shows the week numbers on each row.

      However the weeknumbers start from 0.

      For example:

      Week 0 2008/2009 (28.12.08 – 03.01.09) (the first week of 2009 starts from 0)

      I want it to start from 1.

      How to do this?

      Any help would be appreciated.

      Thanks in advance.

       

      My code is:

       

      var createMultiplePageCalendar = function(){

           YAHOO.stpb.multiPageCalendar = new YAHOO.widget.CalendarGroup("cal1","multiPageCalendarContainer", {PAGES:3,SHOW_WEEK_HEADER:true, START_WEEKDAY: 1,});

           YAHOO.stpb.multiPageCalendar.cfg.setProperty("WEEKDAYS_SHORT", [ "Zo","Ma", "Di", "Wo", "Do", "Vrij", "Za"]);

           YAHOO.stpb.multiPageCalendar.cfg.setProperty("MONTHS_LONG",    ["Januari", "Februari", "Maart", "April", "Mei", "Juni", "Juli", "Augustus", "September", "Oktober", "November", "December"]);

          

           YAHOO.stpb.multiPageCalendar.select(new Date());

           YAHOO.stpb.multiPageCalendar.render();

       

           YAHOO.stpb.multiPageCalendar.selectEvent.subscribe(mySelectDateHandler, YAHOO.stpb.multiPageCalendar, true);

      }

       

      mit freundlichen Gruessen / Kind Regards

      Kudret

       

    • Satyen Desai
      Hi, Sorry about the delayed response. Which version of YUI are you using? YUI 2.5.1 has a fix for the 0 week numbers issue, and also allows you to use ISO 8601
      Message 2 of 2 , May 30, 2008
      • 0 Attachment
        Hi,
        Sorry about the delayed response.

        Which version of YUI are you using?

        YUI 2.5.1 has a fix for the 0 week numbers issue, and also allows you to use ISO 8601 week number definition [ README has details ]

        The following example displays the week numbers correctly, using the ISO 8601 Monday/Jan 4th definition (it also works for Jan 1st based definition).

        http://yuiblog.com/sandbox/yui/v252/examples/calendar/weekNumbers.html

        Regards,
        Satyen


        ________________________________________
        From: ydn-javascript@yahoogroups.com [mailto:ydn-javascript@yahoogroups.com] On Behalf Of Kudret Serin
        Sent: Friday, May 09, 2008 4:15 AM
        To: ydn-javascript@yahoogroups.com
        Subject: [ydn-javascript] Calendar week numbers

         
        Hi all,
        I have a CalendarGroup widget and it shows the week numbers on each row.
        However the weeknumbers start from 0.
        For example:
        Week 0 2008/2009 (28.12.08 - 03.01.09) (the first week of 2009 starts from 0)
        I want it to start from 1.
        How to do this?
        Any help would be appreciated.
        Thanks in advance.
         
        My code is:
         
        var createMultiplePageCalendar = function(){
             YAHOO.stpb.multiPageCalendar = new YAHOO.widget.CalendarGroup("cal1","multiPageCalendarContainer", {PAGES:3,SHOW_WEEK_HEADER:true, START_WEEKDAY: 1,});
             YAHOO.stpb.multiPageCalendar.cfg.setProperty("WEEKDAYS_SHORT", [ "Zo","Ma", "Di", "Wo", "Do", "Vrij", "Za"]);
             YAHOO.stpb.multiPageCalendar.cfg.setProperty("MONTHS_LONG",    ["Januari", "Februari", "Maart", "April", "Mei", "Juni", "Juli", "Augustus", "September", "Oktober", "November", "December"]);
            
             YAHOO.stpb.multiPageCalendar.select(new Date());
             YAHOO.stpb.multiPageCalendar.render();
         
             YAHOO.stpb.multiPageCalendar.selectEvent.subscribe(mySelectDateHandler, YAHOO.stpb.multiPageCalendar, true);
        }
         
        mit freundlichen Gruessen / Kind Regards
        Kudret
         
      Your message has been successfully submitted and would be delivered to recipients shortly.