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

RE: [ydn-javascript] How to disable ALL DAYS

Expand Messages
  • Steven Peterson
    Ashwin, Have you tried customizing the built-in CSS? There are several classes you can modify: calcell, calcellhover, etc. You should change those to get the
    Message 1 of 8 , May 31 3:59 PM
    • 0 Attachment

      Ashwin,

       

      Have you tried customizing the built-in CSS? There are several classes you can modify: calcell, calcellhover, etc. You should change those to get the look you’re trying to achieve for your calendar cells.

       

      Steven Peterson

      Web Developer, Platform Engineering

      Yahoo!

      From: ydn-javascript@yahoogroups.com [mailto:ydn-javascript@yahoogroups.com] On Behalf Of Ashwin Prabhu
      Sent: Wednesday, May 31, 2006 3:00 PM
      To: ydn-javascript@yahoogroups.com
      Subject: Re: [ydn-javascript] How to disable ALL DAYS

       

      Hey,

       

      Tried using YAHOO.util.Dom.addClass(cell, "celldisabled"); 

      The effect is the color of that class is all over my calendar and i am not able to view any of the dates :-)

       

      - Ashwin

       

      On May 31, 2006, at 9:47 PM, Ashwin Prabhu wrote:



      Hi Steven,

       

      Thanks a lot for your input. 

      This kinda works but the problem is it doesn't have the same effect on the date cells,  as they would have when the minDate and maxDate methods are used.

      What i get here is that the links disappear,  so i cant select any of the dates but they look like selectable.

       

      i tried setting the cells class attribute using

       

      cell.setAttribute("class","celldisabled");

       

      Where 'celldisabled' is my custom CSS class attribute. But it didnt work... may be the class getting rendered internally is overriding my class.

       

      Is it possible to change the way to have those look like disabled.

       

      - Ashwin

       

      On May 31, 2006, at 7:47 PM, Steven Peterson wrote:



      In order to disable all days, you will need to modify the default renderer. Change the renderCellDefault function to not append a link. It would look something like this:

       

      myCalendar.renderCellDefault = function(workingDate, cell) {

           cell.innerHTML = "";

           cell.appendChild(document.createTextNode(this.buildDayLabel(workingDate)));

      };

       

      Let me know if this solves your issue.

       

      Steven Peterson

      Web Developer, Platform Engineering

      Yahoo!

      From: ydn-javascript@yahoogroups.com [mailto:ydn-javascript@yahoogroups.com] On Behalf Of Ashwin Prabhu
      Sent: Wednesday, May 31, 2006 11:57 AM
      To: ydn-javascript@yahoogroups.com
      Subject: [ydn-javascript] How to disable ALL DAYS

       

      Hi,

       

      I want to disable all the dates in my calendar. I think its a very trivial problem and should be achievable using minDate and maxDate, but i am not able to get to it.

       

       

      Tried                                                 

       

      cal1.minDate =YAHOO.widget.DateMath.add(new Date(), YAHOO.widget.DateMath.DAY, 0);

       

      AND

       

      cal1.maxDate =YAHOO.widget.DateMath.add(new Date()-1, YAHOO.widget.DateMath.DAY, 0);

       

      But the calendar disappeared in this case.

       

      Any help/hint would be useful.

       

      - Ashwin

       

      On Apr 13, 2006, at 11:23 AM, Steven Peterson wrote:




      What is the date range you’re trying to disable? You can use minDate, maxDate, or attach renderers for any range of dates. If you let me know what the range of dates is that you’re trying to make available, maybe I can assist.

       

      Steven Peterson

      Web Developer, Platform Engineering

      Yahoo!


      From: ydn-javascript@yahoogroups.com [mailto:ydn-javascript@yahoogroups.com] On Behalf Of Pascal PORTIER
      Sent: Thursday, April 13, 2006 6:09 AM
      To:
      ydn-javascript@yahoogroups.com
      Subject: [ydn-javascript] How to disable all days except for some

       

      I'm trying to get selectables only some dates on my calendar.
      I have found how to disable week-ends but not all days...



       


      YAHOO! GROUPS LINKS

       

       


       




       

       

      SPONSORED LINKS

      C programming language

      Computer programming languages

      Java programming language

      The c programming language

      C programming language

      Concept of programming language

       


      YAHOO! GROUPS LINKS

       

       


       

      SPONSORED LINKS

      C programming language

      Computer programming languages

      Java programming language

      The c programming language

      C programming language

      Concept of programming language

       


      YAHOO! GROUPS LINKS

       

       




       

       

      SPONSORED LINKS

      C programming language

      Computer programming languages

      Java programming language

      The c programming language

      C programming language

      Concept of programming language

       


      YAHOO! GROUPS LINKS

       

       


       

       

       

      SPONSORED LINKS

      C programming language

      Computer programming languages

      Java programming language

      The c programming language

      C programming language

      Concept of programming language

       


      YAHOO! GROUPS LINKS

       

       


    Your message has been successfully submitted and would be delivered to recipients shortly.