Skip to main content
Known Participant
January 31, 2013
Answered

jquery date picker

  • January 31, 2013
  • 1 reply
  • 1944 views

<link rel="stylesheet" href="css/jquery-ui.css" />
<script src="scripts/jquery-1.8.3.js"></script>
<script src="scripts/jquery-ui.js"></script>

<script>
    $(function() {

       $("#datepicker").datepicker({ minDate: 0 });

    });


</script>

this loop returned records from table.  Supposed it returned 5 records.  The code below only show the calendar for first text box.  how can I display every calendar all of tex boxese
<cfloop query="q_sale_order">
<cfinput type="text" value="#dateformat(sale_date, 'mm-dd-yy')#"  id="datepicker" name="sale_date#id#"  />
</cfloop>

Thanks

This topic has been closed for replies.
Correct answer Dan_Bracuk

Put the calendar inside your loop.  Also, append the id value from your query to the id attribute of your cfinput tag.

1 reply

Dan_BracukCorrect answer
Inspiring
February 1, 2013

Put the calendar inside your loop.  Also, append the id value from your query to the id attribute of your cfinput tag.

newcfAuthor
Known Participant
February 1, 2013

worked, thanks alot.

newcfAuthor
Known Participant
March 22, 2013

Hi,

Like i said from very first posted, it is dynamic display from the table.  The pop up calendar appears on the right side of text box if i have about 10 or 15 records(rows) on the page .  But if more records such as 50 or 100 records (rows) then when i scroll dow or half way down and click on text box, no pop up calendar appeas on the right side of text box.

How can i make this pop up calendar dispay beside the text box regarless for how many records i have on the page?

here what i have now. 

<script>

     $(function() {   

     $( "##datepicker_#id#" ).datepicker({   

    minDate:0,

    minYear:0,

      changeMonth: true,     

      changeYear: true ,

  

    beforeShow: function(input, inst)

    {

        inst.dpDiv.css({marginTop: -input.offsetHeight + 'px', marginLeft: input.offsetWidth + 'px'});

    }

  

      });

     });

     </script>

thanks