datapicker
Moderator: General Moderators
datapicker
hi,
I want to display the calendar value in a text box while clicking on the calendar image
I want to display the calendar value in a text box while clicking on the calendar image
Re: datapicker
OK? Do you have a question? Are you stuck on something?
Re: datapicker
Hi,
I am trying to use datepicker in dynamically added multiple textboxes....As I am new to php
don't know...what to do? should i use jquery or javascsript or php code for datepicker code?
and how to apply datepicker to multiple textboxes which is in inside a loop also.
I am trying to use datepicker in dynamically added multiple textboxes....As I am new to php
don't know...what to do? should i use jquery or javascsript or php code for datepicker code?
and how to apply datepicker to multiple textboxes which is in inside a loop also.
Re: datapicker
What have you tried so far? I'd start with something like jQuery UI's datepicker.
Re: datapicker
thank you....I am also checking the same site...but in a confusion that from where I should download the js and css file....
I want to add the calender date format when clicking on a calender image
I want to add the calender date format when clicking on a calender image
Re: datapicker
http://jqueryui.com/download/devd wrote:thank you....I am also checking the same site...but in a confusion that from where I should download the js and css file....
May be best, at least initially, to include all the modules. You can refine later when you're closer to deploying.
Re: datapicker
Like this? http://jqueryui.com/datepicker/#icon-triggerdevd wrote:I want to add the calender date format when clicking on a calender image
Re: datapicker
yes...I have finished downloading
jQuery UI 1.11.2 (concatenated JS and CSS files)
jQuery UI 1.11.2 Themes
jQuery UI 1.11.2 (concatenated JS and CSS files)
jQuery UI 1.11.2 Themes
Re: datapicker
yes....same as the link you provided...
But I wanted to add the date picker to multiple textboxes
***** Please use the PHP Code tag *****
almost like this
But I wanted to add the date picker to multiple textboxes
***** Please use the PHP Code tag *****
Code: Select all
for($i=0;$i<$row;$i++)
{
$row=mysql_fetch_array($result);
?>
<tr align="center">
<td><?php echo $i+1 ?></td>
<td><?php echo $row['name'] ?></td>
<input type="hidden" value="<?php echo $row['id'] ?>" name="hfldid[]" />
<td><input type="text" name="txtvalue[]"/></td>
<td>
<input type="text" name="txtDate[]"/>
</td>
<td><input type="button" value="select" onClick="displayDatePicker('txtDate[]', this);" >
</td>
</tr>
<?php }
}
Re: datapicker
hello,
please help me...its very urgent
please help me...its very urgent
Re: datapicker
So use a class instead of an ID for your listener. You can still apply .datepicker() to it.devd wrote:I wanted to add the date picker to multiple textboxes
What does your code look like so far?
Re: datapicker
how to add date picker for array textboxes
Re: datapicker
Add a class to the text inputs and attach a listener to that class that triggers .datepicker()
And stick this in your document.ready block
Code: Select all
<input type="text" name="whatever" class="datepicker">Code: Select all
$('.datepicker').datepicker();Re: datapicker
I am using this code...But now datepicker is coming only for first textbox
<link rel="stylesheet" href="jsdatepick-calendar/jsDatePick_ltr.min.css" />
<script src="jsdatepick-calendar/jsDatePick.min.1.3.js"></script>
<script type="text/javascript" >
window.onload=function()
{
new JsDatePick
(
{
useMode:2,
target:"txtDate",
dateFormat:"%d-%M-%Y"
}
);
};
</script>
This comes inside a table that dynamically adding
<input type="text" name="txtDate[]" id="txtDate" class="datepicker"/>
<link rel="stylesheet" href="jsdatepick-calendar/jsDatePick_ltr.min.css" />
<script src="jsdatepick-calendar/jsDatePick.min.1.3.js"></script>
<script type="text/javascript" >
window.onload=function()
{
new JsDatePick
(
{
useMode:2,
target:"txtDate",
dateFormat:"%d-%M-%Y"
}
);
};
</script>
This comes inside a table that dynamically adding
<input type="text" name="txtDate[]" id="txtDate" class="datepicker"/>
Re: datapicker
Code: Select all
<script src="jsdatepick-calendar/jsDatePick.min.1.3.js"></script>