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

Re: [ydn-javascript] problems using the calendar

Expand Messages
  • Gustavo Gawryszewski
    Thanks! I ve tryed to change the link but if i click on the cell nothing happens, it only happens if i click in the text... i redefined the renderCellDefault
    Message 1 of 6 , May 10 5:07 PM
      Thanks!
      I've tryed to change the link but if i click on the cell nothing happens, it only happens if i click in the text... i redefined the renderCellDefault function ( look the code below ), i tried to make the link area bigger but it didnt work well, any ideas?
      renderCellDefault=function(workingDate,cell){
      cell.innerHTML= "";
      var link=document.createElement("a");
      link.className="linkCalendario";
      link.href="javascript:enviaData();";
      link.name=this.id+"__"+workingDate.getFullYear()+"_"+( workingDate.getMonth()+1)+"_"+workingDate.getDate();
      YAHOO.util.Event.addListener(cell,"click",this.doSelectCell,this);
      if(YAHOO.widget.Calendar_Core._getBrowser()=="ie"){
      YAHOO.util.Event.addListener(cell,"mouseover",this.doCellMouseOver,this);
      YAHOO.util.Event.addListener(cell,"mouseout",this.doCellMouseOut,this);
      }
      link.appendChild(document.createTextNode(this.buildDayLabel(workingDate)));
      cell.appendChild(link);
      }; 

      2006/5/10, Eric Miraglia < miraglia@...>:
      Gustavo,

      I know you had an answer to this already, but in case you're interested in another approach, please visit the following URL:


      I've noted an error in our documentation regarding the reference to cal1.prototype and a subsequent step you need to take before rendering.

      Regards,
      Eric

      On May 10, 2006, at 7:56 AM, Gustavo Gawryszewski wrote:

      Hello!
      I was trying to translate the calendar but i am having some problems,
      im using the Mozilla Firefox 1.5.0.3
      I would like to know if anyone knows what am i doing wrong, because i used the example code from the yui library but its not working...
      var cal1;

      function init() {
      var cal1 = new YAHOO.widget.Calendar("cal1","cal1Container");

      cal1.prototype.customConfig = function(){
                      this.Config.Locale.MONTHS_SHORT = ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun","Jul", "Ago", "Set", "Out", "Nov", "Dez"];
                      this.Config.Locale.MONTHS_LONG = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio","Junho", "Julho", "Agosto", "Setembro",    "Outobro", "Novembro", "Dezembro"];
                      this.Config.Locale.WEEKDAYS_1CHAR = ["D", "S", "T", "Q", "Q", "S", "S"];
                      this.Config.Locale.WEEKDAYS_SHORT = ["Do", "Se", "Te", "Qu", "Qu", "Se", "Sa"];
                      this.Config.Locale.WEEKDAYS_MEDIUM = ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab"];
                      this.Config.Locale.WEEKDAYS_LONG = ["Domingo", "Segunda", "Terça", "Quarta","Quinta", "Sexta", "Sabado"];
                      this.Config.Options.START_MONDAY = true;    
      }
      cal1.render ();
      }

      --
      Gustavo Gawry
      Designer
      www.gawry.com

      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






      --
      Gustavo Gawry
      Designer
      www.gawry.com
    • Steven Peterson
      Gustavo, Try making your changes against the latest version of Calendar (0.10.0) instead of the previous version (0.9.0). If you are trying to make the select
      Message 2 of 6 , May 10 5:52 PM

        Gustavo,

         

        Try making your changes against the latest version of Calendar (0.10.0) instead of the previous version (0.9.0). If you are trying to make the select behavior of the date cells change, you shouldn’t modify the link. Instead, you should try implementing onSelect. The current behavior of the link is that it passes the click to the cell’s event handler so that you can click on the cell or the link and it will still select the date. By modifying the link href, you’re only changing the behavior that occurs when you click the link. You’d be better off setting onSelect to your “enviaData” function so that it gets executed when someone makes a selection in the Calendar, regardless of where they click.

         

        Steven Peterson

        Web Developer, Platform Engineering

        Yahoo!


        From: ydn-javascript@yahoogroups.com [mailto: ydn-javascript@yahoogroups.com ] On Behalf Of Gustavo Gawryszewski
        Sent: Wednesday, May 10, 2006 5:08 PM
        To: ydn-javascript@yahoogroups.com
        Subject: Re: [ydn-javascript] problems using the calendar

         

        Thanks!
        I've tryed to change the link but if i click on the cell nothing happens, it only happens if i click in the text... i redefined the renderCellDefault function ( look the code below ), i tried to make the link area bigger but it didnt work well, any ideas?

        renderCellDefault=function(workingDate,cell){
        cell.innerHTML= "";
        var link=document.createElement("a");
        link.className="linkCalendario";
        link.href="javascript:enviaData();";

        link.name=this.id+"__"+workingDate.getFullYear()+"_"+( workingDate.getMonth()+1)+"_"+workingDate.getDate();
        YAHOO.util.Event.addListener(cell,"click",this.doSelectCell,this);
        if(YAHOO.widget.Calendar_Core._getBrowser()=="ie"){
        YAHOO.util.Event.addListener(cell,"mouseover",this.doCellMouseOver,this);
        YAHOO.util.Event.addListener(cell,"mouseout",this.doCellMouseOut,this);
        }
        link.appendChild(document.createTextNode(this.buildDayLabel(workingDate)));
        cell.appendChild(link);
        }; 

         

        2006/5/10, Eric Miraglia < miraglia@...>:

        Gustavo,

         

        I know you had an answer to this already, but in case you're interested in another approach, please visit the following URL:

         

         

        I've noted an error in our documentation regarding the reference to cal1.prototype and a subsequent step you need to take before rendering.

         

        Regards,

        Eric

         

        On May 10, 2006, at 7:56 AM, Gustavo Gawryszewski wrote:



        Hello!
        I was trying to translate the calendar but i am having some problems,
        im using the Mozilla Firefox 1.5.0.3
        I would like to know if anyone knows what am i doing wrong, because i used the example code from the yui library but its not working...

        var cal1;

        function init() {
        var cal1 = new YAHOO.widget.Calendar("cal1","cal1Container");

        cal1.prototype.customConfig = function(){
                        this.Config.Locale.MONTHS_SHORT = ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun","Jul", "Ago", "Set", "Out", "Nov", "Dez"];
                        this.Config.Locale.MONTHS_LONG = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio","Junho", "Julho", "Agosto", "Setembro",    "Outobro", "Novembro", "Dezembro"];
                        this.Config.Locale.WEEKDAYS_1CHAR = ["D", "S", "T", "Q", "Q", "S", "S"];
                        this.Config.Locale.WEEKDAYS_SHORT = ["Do", "Se", "Te", "Qu", "Qu", "Se", "Sa"];
                        this.Config.Locale.WEEKDAYS_MEDIUM = ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab"];
                        this.Config.Locale.WEEKDAYS_LONG = ["Domingo", "Segunda", "Terça", "Quarta","Quinta", "Sexta", "Sabado"];
                        this.Config.Options.START_MONDAY = true;    
        }
        cal1.render ();
        }


        --
        Gustavo Gawry
        Designer
        www.gawry.com


        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

         

         





        --
        Gustavo Gawry
        Designer
        www.gawry.com

      • Gustavo Gawryszewski
        Its wierd because i tried to do it using the onSelect but it was not working fine on IE 6... but now is working fine... im not sure about what happened. Thanks
        Message 3 of 6 , May 11 8:28 AM
          Its wierd because i tried to do it using the onSelect but it was not working fine on IE 6...
          but now is working fine... im not sure about what happened.
          Thanks

          2006/5/10, Steven Peterson < peterson@...>:

          Gustavo,

           

          Try making your changes against the latest version of Calendar (0.10.0) instead of the previous version (0.9.0). If you are trying to make the select behavior of the date cells change, you shouldn't modify the link. Instead, you should try implementing onSelect. The current behavior of the link is that it passes the click to the cell's event handler so that you can click on the cell or the link and it will still select the date. By modifying the link href, you're only changing the behavior that occurs when you click the link. You'd be better off setting onSelect to your "enviaData" function so that it gets executed when someone makes a selection in the Calendar, regardless of where they click.

           

          Steven Peterson

          Web Developer, Platform Engineering

          Yahoo!


          From: ydn-javascript@yahoogroups.com [mailto:ydn-javascript@yahoogroups.com] On Behalf Of Gustavo Gawryszewski
          Sent: Wednesday, May 10, 2006 5:08 PM
          To: ydn-javascript@yahoogroups.com
          Subject: Re: [ydn-javascript] problems using the calendar

           

          Thanks!
          I've tryed to change the link but if i click on the cell nothing happens, it only happens if i click in the text... i redefined the renderCellDefault function ( look the code below ), i tried to make the link area bigger but it didnt work well, any ideas?

          renderCellDefault=function(workingDate,cell){
          cell.innerHTML= "";
          var link=document.createElement("a");
          link.className="linkCalendario";
          link.href="javascript:enviaData();";

          link.name=this.id+"__"+workingDate.getFullYear()+"_"+( workingDate.getMonth()+1)+"_"+workingDate.getDate();
          YAHOO.util.Event.addListener(cell,"click",this.doSelectCell,this);
          if(YAHOO.widget.Calendar_Core._getBrowser()=="ie"){
          YAHOO.util.Event.addListener(cell,"mouseover",this.doCellMouseOver,this);
          YAHOO.util.Event.addListener(cell,"mouseout",this.doCellMouseOut,this);
          }
          link.appendChild(document.createTextNode(this.buildDayLabel(workingDate)));
          cell.appendChild(link);
          }; 

           

          2006/5/10, Eric Miraglia < miraglia@... >:

          Gustavo,

           

          I know you had an answer to this already, but in case you're interested in another approach, please visit the following URL:

           

           

          I've noted an error in our documentation regarding the reference to cal1.prototype and a subsequent step you need to take before rendering.

           

          Regards,

          Eric

           

          On May 10, 2006, at 7:56 AM, Gustavo Gawryszewski wrote:



          Hello!
          I was trying to translate the calendar but i am having some problems,
          im using the Mozilla Firefox 1.5.0.3
          I would like to know if anyone knows what am i doing wrong, because i used the example code from the yui library but its not working...

          var cal1;

          function init() {
          var cal1 = new YAHOO.widget.Calendar("cal1","cal1Container");

          cal1.prototype.customConfig = function(){
                          this.Config.Locale.MONTHS_SHORT = ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun","Jul", "Ago", "Set", "Out", "Nov", "Dez"];
                          this.Config.Locale.MONTHS_LONG = ["Janeiro", "Fevereiro", "Mar�o", "Abril", "Maio","Junho", "Julho", "Agosto", "Setembro",    "Outobro", "Novembro", "Dezembro"];

                          this.Config.Locale.WEEKDAYS_1CHAR = ["D", "S", "T", "Q", "Q", "S", "S"];
                          this.Config.Locale.WEEKDAYS_SHORT = ["Do", "Se", "Te", "Qu", "Qu", "Se", "Sa"];
                          this.Config.Locale.WEEKDAYS_MEDIUM = ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab"];
                          this.Config.Locale.WEEKDAYS_LONG = ["Domingo", "Segunda", "Ter�a", "Quarta","Quinta", "Sexta", "Sabado"];

                          this.Config.Options.START_MONDAY = true;    
          }
          cal1.render ();
          }


          --
          Gustavo Gawry
          Designer
          www.gawry.com


          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

           

           





          --
          Gustavo Gawry
          Designer
          www.gawry.com



          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






          --
          Gustavo Gawry
          Designer
          www.gawry.com
        Your message has been successfully submitted and would be delivered to recipients shortly.