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

2-Up Calendars questions.

Expand Messages
  • adm832001
    Hello there! We have some questions about the 2-Up Calendar. We ve been developing to the 2-up calendar, and we ve run into a situation where we would like to
    Message 1 of 3 , May 16, 2006
    • 0 Attachment
      Hello there!

      We have some questions about the 2-Up Calendar.

      We've been developing to the 2-up calendar, and we've run into a
      situation where we would like to accomplish, on page updates to the
      state of the calendar. Our calendars accept only one selected date at
      a time.

      Picture links in the page with associated javascript functions that
      perform these updates. These updates are of the following types:

      1. Change the calendar's viewport months (the months shown) via
      external link. (i.e. calendar shows 'June/July', click link, now
      calendar shows 'February/March'.)

      2. Change the calendar's viewport months (like 1 above) plus change
      the selected date to a specific date. (i.e. calendar shows
      'June/July' and July 3rd is selected, click link, now calendar shows
      'February/March' and Feb 14th is selected.)

      3. Change the calendar's viewport months (like 1 and 2 above) plus
      change the selected date to a specific date (like 2 above) plus change
      the min/max dates. (i.e. calendar shows 'June/July' and July 3rd is
      selected and min date is June 2nd, max date is July 15th, click link,
      now calendar shows 'February/March' and Feb 14th is selected and min
      date is Feb 7th, max date is March 22nd.)

      Could you show an example code bit(s) that would perform the above tasks?

      Thank you!
    • Steven Peterson
      1. You can change the pages on the Calendar2up programmatically by calling nextMonth() and previousMonth() against your Calendar2up instance. You can attach a
      Message 2 of 3 , May 16, 2006
      • 0 Attachment

         

        1. You can change the pages on the Calendar2up programmatically by calling nextMonth() and previousMonth() against your Calendar2up instance. You can attach a JavaScript event listener to your link using the Event utility to call these next/previous month functions.
        2. Changing the viewport months can be achieved by calling setMonth on your Calendar2up. Changing the selected date is as easy as calling the select function with your date(s).
        3. To change the min/max days on a 2up Calendar, you would set them programmatically against each Calendar in the 2up group. For instance:

         

        myCal.pages[0].minDate = new Date(2006,3,22);

        myCal.pages[1].minDate = new Date(2006,3,22);

         

        myCal.pages[0].maxDate = new Date(2006,3,29);

        myCal.pages[1].maxDate = new Date(2006,3,29);

         

                    Note that in JavaScript Date objects, the month is 0-indexed, so 0 is January, 1 is February, etc.

         

        Hopefully this will get your started! If you have any more questions, please don’t hesitate to ask.

         

        Thanks!

        Steven Peterson

        Web Developer, Platform Engineering

        Yahoo!


        From: ydn-javascript@yahoogroups.com [mailto: ydn-javascript@yahoogroups.com ] On Behalf Of adm832001
        Sent: Tuesday, May 16, 2006 8:20 AM
        To: ydn-javascript@yahoogroups.com
        Subject: [ydn-javascript] 2-Up Calendars questions.

         

        Hello there!

        We have some questions about the 2-Up Calendar.

        We've been developing to the 2-up calendar, and we've run into a
        situation where we would like to accomplish, on page updates to the
        state of the calendar.  Our calendars accept only one selected date at
        a time.

        Picture links in the page with associated javascript functions that
        perform these updates.  These updates are of the following types:

        1. Change the calendar's viewport months (the months shown) via
        external link.  (i.e. calendar shows 'June/July', click link, now
        calendar shows 'February/March'.)

        2. Change the calendar's viewport months (like 1 above) plus change
        the selected date to a specific date.  (i.e. calendar shows
        'June/July' and July 3rd is selected, click link, now calendar shows
        'February/March' and Feb 14th is selected.)

        3. Change the calendar's viewport months (like 1 and 2 above) plus
        change the selected date to a specific date (like 2 above) plus change
        the min/max dates.  (i.e. calendar shows 'June/July' and July 3rd is
        selected and min date is June 2nd, max date is July 15th, click link,
        now calendar shows 'February/March' and Feb 14th is selected and min
        date is Feb 7th, max date is March 22nd.)

        Could you show an example code bit(s) that would perform the above tasks?

        Thank you!




      • mrprogguy
        Glad I read back...this solved the issue I was having. ... by ... instance. ... Event ... setMonth on ... the ... them ... indexed, so ... questions, please
        Message 3 of 3 , Jun 1, 2006
        • 0 Attachment
          Glad I read back...this solved the issue I was having.

          --- In ydn-javascript@yahoogroups.com, "Steven Peterson"
          <peterson@...> wrote:
          >
          >
          >
          > 1. You can change the pages on the Calendar2up programmatically
          by
          > calling nextMonth() and previousMonth() against your Calendar2up
          instance.
          > You can attach a JavaScript event listener to your link using the
          Event
          > utility to call these next/previous month functions.
          > 2. Changing the viewport months can be achieved by calling
          setMonth on
          > your Calendar2up. Changing the selected date is as easy as calling
          the
          > select function with your date(s).
          > 3. To change the min/max days on a 2up Calendar, you would set
          them
          > programmatically against each Calendar in the 2up group. For
          instance:
          >
          >
          >
          > myCal.pages[0].minDate = new Date(2006,3,22);
          >
          > myCal.pages[1].minDate = new Date(2006,3,22);
          >
          >
          >
          > myCal.pages[0].maxDate = new Date(2006,3,29);
          >
          > myCal.pages[1].maxDate = new Date(2006,3,29);
          >
          >
          >
          > Note that in JavaScript Date objects, the month is 0-
          indexed, so
          > 0 is January, 1 is February, etc.
          >
          >
          >
          > Hopefully this will get your started! If you have any more
          questions, please
          > don't hesitate to ask.
          >
          >
          >
          > Thanks!
          >
          > Steven Peterson
          >
          > Web Developer, Platform Engineering
          >
          > Yahoo!
          >
          > _____
          >
          > From: ydn-javascript@yahoogroups.com [mailto:ydn-
          javascript@yahoogroups.com]
          > On Behalf Of adm832001
          > Sent: Tuesday, May 16, 2006 8:20 AM
          > To: ydn-javascript@yahoogroups.com
          > Subject: [ydn-javascript] 2-Up Calendars questions.
          >
          >
          >
          > Hello there!
          >
          > We have some questions about the 2-Up Calendar.
          >
          > We've been developing to the 2-up calendar, and we've run into a
          > situation where we would like to accomplish, on page updates to the
          > state of the calendar. Our calendars accept only one selected date
          at
          > a time.
          >
          > Picture links in the page with associated javascript functions that
          > perform these updates. These updates are of the following types:
          >
          > 1. Change the calendar's viewport months (the months shown) via
          > external link. (i.e. calendar shows 'June/July', click link, now
          > calendar shows 'February/March'.)
          >
          > 2. Change the calendar's viewport months (like 1 above) plus change
          > the selected date to a specific date. (i.e. calendar shows
          > 'June/July' and July 3rd is selected, click link, now calendar shows
          > 'February/March' and Feb 14th is selected.)
          >
          > 3. Change the calendar's viewport months (like 1 and 2 above) plus
          > change the selected date to a specific date (like 2 above) plus
          change
          > the min/max dates. (i.e. calendar shows 'June/July' and July 3rd is
          > selected and min date is June 2nd, max date is July 15th, click
          link,
          > now calendar shows 'February/March' and Feb 14th is selected and min
          > date is Feb 7th, max date is March 22nd.)
          >
          > Could you show an example code bit(s) that would perform the above
          tasks?
          >
          > Thank you!
          >
          >
          >
          >
          >
          >
          > SPONSORED LINKS
          >
          >
          > C
          > <http://groups.yahoo.com/gads?
          t=ms&k=C+programming+language&w1=C+programming
          >
          +language&w2=Computer+programming+languages&w3=Java+programming+langua
          ge&w4=
          >
          The+c+programming+language&w5=C+++programming+language&w6=Concept+of+p
          rogram
          > ming+language&c=6&s=194&.sig=lC1PxfzvANy_Br-nPkXYTA> programming
          language
          >
          > Computer
          > <http://groups.yahoo.com/gads?
          t=ms&k=Computer+programming+languages&w1=C+pro
          >
          gramming+language&w2=Computer+programming+languages&w3=Java+programmin
          g+lang
          >
          uage&w4=The+c+programming+language&w5=C+++programming+language&w6=Conc
          ept+of
          > +programming+language&c=6&s=194&.sig=7XFXh-0Mon1IfLuOVlwvdg>
          programming
          > languages
          >
          > Java
          > <http://groups.yahoo.com/gads?
          t=ms&k=Java+programming+language&w1=C+programm
          >
          ing+language&w2=Computer+programming+languages&w3=Java+programming+lan
          guage&
          >
          w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+o
          f+prog
          > ramming+language&c=6&s=194&.sig=UITodqn0qTCUcae_mpRQog> programming
          > language
          >
          >
          > The
          > <http://groups.yahoo.com/gads?
          t=ms&k=The+c+programming+language&w1=C+program
          >
          ming+language&w2=Computer+programming+languages&w3=Java+programming+la
          nguage
          >
          &w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+
          of+pro
          > gramming+language&c=6&s=194&.sig=xnZC2-BzDSLhhir3MLtssg> c
          programming
          > language
          >
          > C
          > <http://groups.yahoo.com/gads?
          t=ms&k=C+++programming+language&w1=C+programmi
          >
          ng+language&w2=Computer+programming+languages&w3=Java+programming+lang
          uage&w
          >
          4=The+c+programming+language&w5=C+++programming+language&w6=Concept+of
          +progr
          > amming+language&c=6&s=194&.sig=RTzTl3BOJWbWK14CdUrO0w> programming
          language
          >
          >
          > Concept
          > <http://groups.yahoo.com/gads?
          t=ms&k=Concept+of+programming+language&w1=C+pr
          >
          ogramming+language&w2=Computer+programming+languages&w3=Java+programmi
          ng+lan
          >
          guage&w4=The+c+programming+language&w5=C+++programming+language&w6=Con
          cept+o
          > f+programming+language&c=6&s=194&.sig=x4ueM0tA417JDq3ckdJ9CQ> of
          > programming language
          >
          >
          >
          > _____
          >
          > YAHOO! GROUPS LINKS
          >
          >
          >
          > * Visit your group "ydn-javascript
          > <http://groups.yahoo.com/group/ydn-javascript> " on the web.
          >
          > * To unsubscribe from this group, send an email to:
          > ydn-javascript-unsubscribe@yahoogroups.com
          > <mailto:ydn-javascript-unsubscribe@yahoogroups.com?
          subject=Unsubscribe>
          >
          > * Your use of Yahoo! Groups is subject to the Yahoo!
          > <http://docs.yahoo.com/info/terms/> Terms of Service.
          >
          >
          >
          > _____
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.