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

How to put current month in middle?

Expand Messages
  • andric2k
    Hi All, I am creating a 3-months calendar and I would like to make current month in the middle? Any one know how to do that ? Thanks and regards, Andric Ng
    Message 1 of 2 , Jan 2, 2008
    • 0 Attachment
      Hi All,

      I am creating a 3-months calendar and I would like to make current
      month in the middle? Any one know how to do that ?

      Thanks and regards,
      Andric Ng
    • Satyen Desai
      Hi, You can set the pagedate property to (today - 1 month): var pgDate = YAHOO.widget.DateMath.subtract( new Date(), YAHOO.widget.DateMath.MONTH, 1); var cal =
      Message 2 of 2 , Jan 3, 2008
      • 0 Attachment
        Hi,
        You can set the pagedate property to (today - 1 month):

        var pgDate = YAHOO.widget.DateMath.subtract(
        new Date(),
        YAHOO.widget.DateMath.MONTH, 1);

        var cal = new YAHOO.widget.CalendarGroup("cal", {
        pages:3,
        pagedate: pgDate});
        cal.render();

        Hope that helps,
        Satyen
      Your message has been successfully submitted and would be delivered to recipients shortly.