Link to home
Start Free TrialLog in
Avatar of rgb192
rgb192Flag for United States of America

asked on

want all 3 input textboxes to be datepickers

$show[$tablename].='
    <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.0/themes/base/jquery-ui.css" />
    <script src="http://code.jquery.com/jquery-1.8.2.js"></script>
    <script src="http://code.jquery.com/ui/1.9.0/jquery-ui.js"></script>
    <script>
    $(function() {
        $( "#datepicker" ).datepicker();
    });
    </script>';

$arr = array("membersince","membership_startdate","membership_enddate");
foreach ($arr as &$tablename) { 
$show[$tablename].='<br>'.$tablename.'<input type="text" id="datepicker" name="'.$tablename.'" value="'.$rowall[$tablename].'"/>';
}

Open in new window



three textboxes

but only the first textbox has jquery datepicker.

I want all 3 input textboxes to be datepickers
ASKER CERTIFIED SOLUTION
Avatar of Phil Phillips
Phil Phillips
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rgb192

ASKER

both work

thanks