YUI Calendar

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SagarDoke
    New Member
    • Feb 2008
    • 24

    YUI Calendar

    How to add YUI calender to combobox dropdown panel?

    I mean,

    Code:
    <select id="calCombo" onclick="showCal()"></select>
    
    function showCal()
    {
       var op = new Option(Calendar object);
       calCombo.options[1]=op;
    }
    like this.

    Is there any way to add calendar to option[1] panel of combobox? Above one its just an example. Can I get the right method to add calendar?

    Thanks.
    Last edited by acoder; Feb 16 '09, 09:27 AM. Reason: Added [code] tags
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    When you say add a calendar, what do you mean? Do you want a calendar to show when a particular option is selected?

    Comment

    • SagarDoke
      New Member
      • Feb 2008
      • 24

      #3
      Hi,

      Please find the attachment for image file.

      I want to create a combobox with default value is today's date.
      And onchange of value or on click event calendar will be displayed as an option.
      Attached Files

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        If the user cannot use the combo box as a drop-down, why not use a text box and either have an icon or via clicking on the text box trigger the display of the calendar?

        Comment

        • SagarDoke
          New Member
          • Feb 2008
          • 24

          #5
          Hi,

          I can use textbox with calendar button. But its a client requirement. :-)
          If its not possible then I can say that. but if its possible then I cant. I have to create gui as they want.

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #6
            Well, it should be possible to display the calendar on clicking the select box, but it does mean that the options will appear as well as the calendar. You can display the calendar after an option is selected, but that defeats the purpose. Just because it is possible doesn't necessarily mean that you have to do it.

            Comment

            • gits
              Recognized Expert Moderator Expert
              • May 2007
              • 5390

              #7
              probably the best would be to create a textbox that has a button-control at the right edge ... some css would help to 'emulate' such a widget ... or hav a closer look at the YUI-widgets ... i guess there is one that should do the job?

              kind regards

              Comment

              Working...