I have generated textbox dynamically and trying to get date picker for each textboxes separately.
The problem is if i select a text box and pick date it will apply for all textboxes. I don't know how to pass the value to get the result. Please forgive If my English (or) the way I expressed is wrong. I will be thankful for your help.
My Script to call calendar:
<script type="text/javascript">
$(window).load( function() {
$('#mycalendar3').monthly({
mode: 'picker1',
target: '#mytarget1',
setWidth: '370px',
startHidden: true,
showTrigger: '#mytarget1',
stylePast: true,
disablePast: true,
xmlUrl: 'events.xml'
});
$('#mycalendar2').monthly({
mode: 'picker1',
target: '.value1',
setWidth: '370px',
startHidden: true,
showTrigger: '.value1',
stylePast: true,
disablePast: true,
xmlUrl: 'events.xml'
});
switch(window.location.protocol) {
case 'http:':
case 'https:':
// running on a server, should be good.
break;
case 'file:':
alert('Just a heads-up, events will not work when run locally.');
}
});
HTML code:
<div style="display:inline-block; width:150px;">
<input type="text" class="value1" id="mytarget" >
<div class="monthly" id="mycalendar2"></div>
</div>
<div style="display:inline-block; width:150px;">
<input type="text" id="mytarget1">
<div class="monthly" id="mycalendar3"></div>
</div>