| Author |
Javascript onchange event
|
Satish Nair
Greenhorn
Joined: Apr 04, 2012
Posts: 23
|
|
Dear All,
I have a form wherein in the option list i have displayed some countries. What i want is when i click on a particular country the date picker (ie date range) should get displayed .Kindly help
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16483
|
|
Sure, we can help. But you have to tell us what you need help with. From your post it isn't possible to guess what your problem is.
So, what have you done so far? Do you have some code which doesn't work right? Show us what you have and ask a question about that.
|
 |
Satish Nair
Greenhorn
Joined: Apr 04, 2012
Posts: 23
|
|
<form method="get" id="form1" name="form1">
<select name="sel" onchange="">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</form>
<script type='text/javascript'>
$(function() {
$('#calendar').fullCalendar({
theme: true,
header: {
left: '',
center: '',
right: ''
},
defaultView: 'agendaDay',
editable: false,
events: "../fullcalendar/JSONcreator"
});
$('#datepicker').datepicker({
inline: true,
onSelect: function(dateText, inst) {
var d = new Date(dateText);
$('#calendar').fullCalendar('gotoDate', d);
}
});
})
</script>
Here i have a date function i want the above function to be called when a drop down item is selected
|
 |
Keith Wood
Author
Ranch Hand
Joined: Aug 28, 2012
Posts: 38
|
|
Is the datepicker attached to a div (inline) or an input field (popup)? If the former you could do something like this:
BTW, the jQuery UI datepicker doesn't allow the selection of a date range.
|
Author of the upcoming "Extending jQuery" book from Manning.
|
 |
 |
|
|
subject: Javascript onchange event
|
|
|